-
May 11th, 2010, 05:49 AM
#1
Getting 2 MainWindows
this is my code.
the idea being to set the data context of the MainWindow.
However, I am given 2 main windows, one blank, one with all the stuff in the view model.
(I was attempting to replicate the example here
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
for my own objects.)
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
MainWindow window = new MainWindow();
var viewModel = new AllConversationsViewModel();
MainWindow.DataContext = viewModel;
window.Show();
}
any clues?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|