Play-To Won't Work for Secondary Views RRS feed

  • Question

  • I have a Xaml/C# Windows 8.1 app that creates a secondary window using CoreApplication.CreateNewView() and ApplicationViewSwitcher.TryShowAsStandaloneAsync()

    In the OnNavigatedTo() override for the new page, I am calling

                    PlayToManager.GetForCurrentView().SourceRequested += this.OnSourceRequested

    But I am finding that when the secondary view is active, the OnSourceRequested never gets called.

    If I call add the event handler for

                    PlayToManager.GetForCurrentView().SourceRequested += this.OnSourceRequested

    To my primary view, it does get called.

    1. Is there anything that I must do to enable new windows for my app to support Play-To source requests?
    2. Is this a limitation of the platform or is it a bug?



    Michael S. Scherotter
    Principal Architect Evangelist Microsoft Corporation,
    Blog, Twitter, Facebook

    Friday, October 25, 2013 12:20 AM

All replies

  • Have you tried calling that in a dispatcher?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, October 25, 2013 7:11 PM
  • Matt,

    I've tried attaching the SourceRequsted event handler in a Dispatcher but that didn't fix it - the SourceRequested event handler only gets called for the initial window, not a secondary window.


    <p>Michael S. Scherotter<br/> Media Experience Evangelist, Microsoft Corporation<br/> <a href="http://blogs.msdn.com/synergist">Blog</a>, <a href="http://twitter.com/synergist"> Twitter</a>, <a href="http://facebook.com/synergist">Facebook</a> </p>

    Friday, October 25, 2013 7:27 PM