Getting 2 MainWindows
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2

Thread: Getting 2 MainWindows

Hybrid View

  1. #1
    Join Date
    May 2010

    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
    for my own objects.)

    protected override void OnStartup(StartupEventArgs e)
    MainWindow window = new MainWindow();
    var viewModel = new AllConversationsViewModel();
    MainWindow.DataContext = viewModel;

    any clues?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: Getting 2 MainWindows

    Were you able to get the code that came with the example running?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center