Custom popup and windows in WPF the MVVM way

added by alessandrokicks
4/26/2011 2:15:59 AM

571 Views

In WPF, using the regular window control to launch child windows makes MVVM and separating a View concern from the ViewModel very difficult. The problem: The window control works nicely as a shell for your application, however, launching child windows is problematic because the window control cannot be defined in xaml unless as the root element. So, if you wanted to launch child windows inside a parent window, you lose the ability to declare these in xaml. This loss means you will not be able to bind to properties in your ViewModel from the view for the purpose of opening/closing a window. Instead you end up doing this imperatively in code..


0 comments