Thursday, March 01, 2012 3:42 AMHello:Well folks this WPF and MVVM is an adventure that's for sure. What Ihave so far is the start of MVVM with Controller.I can get to the controller.Start() through the Application_Startup() ofthe App.xaml.cs.I have a PayrollView.xaml and a PayRollViewModel.csIn the controller.Start() how do I make the PayRollView.xaml show on thescreen?
Monday, March 05, 2012 6:19 AMModerator
If your application does not have any main window, you cannot show any XAML or View on the screen. So you have to build a view as the Application Main Window, and show it first. Then you could host your *.xaml content as the child in the MainWindow. Or you could show your Window View as the Main Window of the application. I recommend you to download thePrism project, it has a sample named "Hello World". That contains a class "Bootstrapper" class which set the main window for app, you could learn the architecture from Prism.
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Monday, March 05, 2012 11:22 AMThanks I came past that problem by using source code from demo projectand talking to some guys at work. Yeah I found out that a MainPage isneeded before you can show usercontrols.
- Marked As Answer by Kee PoppyModerator Tuesday, March 20, 2012 8:49 AM