Click here to Skip to main content
13,191,400 members (72,701 online)
Rate this:
Please Sign up or sign in to vote.
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 7-Sep-12 4:09am
Updated 7-Sep-12 17:45pm
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.171017.1 | Last Updated 7 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100