locked
StartProjectingAsync RRS feed

  • General discussion

  • I have an existing Windows Store App that uses basic page navigation. It has a MainPage class that is instantiated in App.xaml.cs. The user then navigates to the rest of the application from there. The MainPage class stays around and has public functions such as for opening settings flyouts, etc. This is all very basic and common practice for Windows Store Apps.

    I am trying to implement a second monitor (second window on a second monitor) to display essentially static content while the user continues to interact with the main app on the primary monitor. I have adapted code from the "Projection" code sample.

    My problem appears to be thread related and I do not know how to overcome it. Once the second window is opened, the application crashes when trying to navigate to the next page in the main application. I have tried activating the main page again through LaunchUriAsync as shown in the "MultipleViews" code sample, but the problem persists.

    Both of the code samples use the odd "scenario" model for showing different page content. This is not a true navigation model like a regular app would use, so the sample apps do not have the problem nor demonstrate how to continue a standard frame navigation model once a new window is opened.

    Can someone help me implement a simple second window (that just displays a static image) that does not break the navigation of the main application? Again, I am sure that it has to do with different threads, but I do not have the depth of understanding to know how to overcome it.

    Thank you for your help!


    Thaine Norris

    EDIT -- Never mind. I have just implemented a test application from the GridView template and added the code from the Projection sample. The second window and frame navigation work fine. Clearly I have something in my code I need to fix!

    FINAL EDIT -- In case someone runs across this problem themselves, I'll let you know what I found. I have a static bitmap image that is used as the background for all of my pages. It is applied to the XAML style at runtime through an extension function of the Page class. I was trying to access it from both threads; that of the orginal app window and that of the new projected window.

    Friday, January 10, 2014 3:49 PM