Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I am building a DLL using WPF -MVVM . I have a custom dialog implemented in this DLL using MVVM. I want to make the View class of this dialog internal to the DLL so that anyone referencing this DLL does not have access to this view class. Is there some way to achieve this ? If I just mark the View class as internal , then the compiler isn't happy and says that partial classes have different visibilities. Am not sure if making both parts of the partial class internal is the correct way since these View classes would need to be called by the WPF runtime.

Any help is appreciated.
Posted
Updated 7-Sep-12 17:45pm
v3
Comments
Kenneth Haugland 8-Sep-12 14:59pm    
I dont think you can. But im not entirely sure..
Thomas Duwe 10-Sep-12 7:20am    
I think this depends on how your view and viewmodel are created and shown.

Say if you have a view factory with some method ShowCustomDialog(args...)
and you instantiate your viewmodel and view and assigning the datacontext of the view manually in this factory method, there shouldn't be a problem (I think).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900