locked
Airspace restrictions

    Question

  • Do the airspace restrictions still hold for Metro applications and games? Is it possible for Metro applications to use the pre-provided Metro UI controls cleanly with DirectX? I've seen the Presenter class but the documentation on how to use it is extremely sparse- i.e., pretty much nonexistent.
    • Edited by DeadMG Sunday, September 18, 2011 2:14 PM
    Sunday, September 18, 2011 1:16 PM

Answers

  • I was not able to dig up and Samples on the Presenter class yet.  There will be updated documentation on the dev site in the future however.  While mixing XAML and DirectX is not currently supported in the Developer Preview, it is an interesting scenario and we’d love to see more feedback from other posters on how valuable this would be for us to enable!

     


    Jeff Sanders (MSFT)
    Wednesday, September 28, 2011 12:46 PM
    Moderator

All replies

  • Could you clarify the question for us on the forum?  Do you want to have a surface defined with XAML and then write on top of that with DirectX?


    Jeff Sanders (MSFT)
    Monday, September 19, 2011 8:26 PM
    Moderator
  • What I'd really like is to do is render some XAML controls to a Direct3D surface, which I can then blend or compose or do whatever with as I like with the rest of my Direct3D scene. The Presenter class seems to be exactly what I'm looking for, but the documentation gives no hints as to how to make it happen.
    Monday, September 19, 2011 9:07 PM
  • Sorry, you cannot mix XAML and DirectX.  I will do some digging around on the presenter class and see what exactly it is used for and post here however.
    Jeff Sanders (MSFT)
    Tuesday, September 20, 2011 12:48 PM
    Moderator
  • I was not able to dig up and Samples on the Presenter class yet.  There will be updated documentation on the dev site in the future however.  While mixing XAML and DirectX is not currently supported in the Developer Preview, it is an interesting scenario and we’d love to see more feedback from other posters on how valuable this would be for us to enable!

     


    Jeff Sanders (MSFT)
    Wednesday, September 28, 2011 12:46 PM
    Moderator
  • Can this be made available to desktop?
    Wednesday, September 28, 2011 5:42 PM
  • Slx64, if you're asking about WPF or Silverlight for the desktop you'll have to check in those forums.  WPF supports interop with Direct3D via http://msdn.microsoft.com/en-us/library/system.windows.interop.d3dimage.aspx , but that's to render a D3D image in a WPF app not to render XAML controls into a D3D app.  You can render WPF and Silverlight controls to a WritableBitmap and then send that to the D3D surface, but they aren't live and won't respond to input.

    Wednesday, September 28, 2011 9:18 PM
    Owner
  • @Jeff Sanders: +1 (1,000 if I could) vote here. Being able to run our own XAML presenters will fix a long standing fundamental flaw with WPF -- indeterminate video frame rates. 

    MediaElement/Player is garbage for full screen video playback, as is d3dimage used as an EVR presenter. We can't host good video on WPF's rendering pipeline today, at all. If we can control the timing of WPF's Present() on our own direct3d surface, WPF will *finally* be usable for professional video mixing and STB applications. i.e. we can present video frames in direct3d at correct intervals, and render WPF's scene discretely on a background thread, and alpha blend accordingly.

    It would be super awesome if you could actually port Windows.UI.Xaml.Interop.Presenter into the core .NET Framework vNext, make it run under Vista+ and Windows Embedded Standard 7 as well. Folks love your WPF/XAML framework so much, that there's even a project which clones WPF for d3d natively (see WPFG ) - what does that tell you? The level of effort gone in to achieving a native XAML implementation by Gregory Hermann is enormous, if that's not proof enough of demand/value for this feature, I don't know what is. 

    No doubt gamers will also love being able to author their 2d elements/GUIs in XAML. 

    Friday, September 30, 2011 7:32 PM
  • Slx64, if you're asking about WPF or Silverlight for the desktop you'll have to check in those forums.  WPF supports interop with Direct3D via http://msdn.microsoft.com/en-us/library/system.windows.interop.d3dimage.aspx , but that's to render a D3D image in a WPF app not to render XAML controls into a D3D app.  You can render WPF and Silverlight controls to a WritableBitmap and then send that to the D3D surface, but they aren't live and won't respond to input.

    Hence was my question.

    Can there be a common denominator already for rendering XAML?

     

     

    Saturday, October 01, 2011 1:31 PM
  • It would be incredibly valuable, as my searches basically indicate that there are very few pre-existing high quality UI libraries for D3D11, and being able to use the Metro APIs would enable a more native look and feel as well as much faster development times.
    Saturday, October 01, 2011 10:30 PM
  • Hi,

    We would love to be able to sit XAML components on top of our DirectX11 application.  We currently have video playback running on top of our test DirectX app using IMFMediaEngine and it would be great if we could place IE10 into our application in a similar manner.  We would also like to use existing metro style controls so we don't have to replicate the style within DirectX.

    Cheers.

    Wednesday, October 12, 2011 12:22 AM
  • At a minimum, it would be nice to receive events that indicate the user has swiped up or down on that 1 pixel sensor border that controls the app bar.  I can certainly see many of us wanting to share behavior with the normal apps at least when it comes to disclosing app specific chrome, or dismissing it.
    Sunday, December 04, 2011 9:44 PM
  • I was able to get those notifications wired up in a dx11 app.  What I do see is a need to add more info to those events so that in addition to knowing if it was a touch or keyboard driven event, also add if it occurred at the top or bottom rows.  Also a sample app that shows a very basic way to emulate an app bar drag out, and dismiss from a dx11 app would be fantastic.
    Monday, December 05, 2011 7:27 PM
  • Jeff,

     

    Check out what Jeremiah came up with, in regards to a XAML/DirectX interop over Metro: http://jeremiahmorrill.com/2011/10/10/windows-8-metro-xaml-ui-and-direct3d-11-interop/

     

    Hope this helps!

     

    -Andre

    Monday, December 12, 2011 2:41 AM
  • Thanks for sharing with the Community Andre.  Did you try this out yet?
    Jeff Sanders (MSFT)
    Monday, December 12, 2011 1:01 PM
    Moderator