Reputation: 90465
If I want to show some dialogs in my app main window, without creating a new window, what approach should I take?
In your favorit approach, how should I separate the dialog content from the main window content. Should I put them in separate user controls?
Upvotes: 2
Views: 731
Reputation: 2931
Take a look at Caliburn.Micro, its a very simple MVVM framework that supports the concept of a conductor (typically your shellview main window) and Screens (seperate content in user controls).
Essentially though, you would create your shell (main window) and create your seperate content in user controls, you would then use a contentcontrol to dynamically load and display each of the user controls containing your content.
http://caliburnmicro.codeplex.com/
I would definately advise you to take a look at Caliburn.Micro at the link above, its a very small framework that is simple to setup and intimately learn (less than a few hundred lines of code)... it also uses convention over configuration which enables some very cool things (automatic binding to view model properties of controls based on name etc).
Check it out!
Upvotes: 2
Reputation: 134167
According to how-do-make-modal-dialog-in-wpf, you could just use the Window.ShowDialog method.
Upvotes: 4