locked
Direct3D mix with XAML

    Question

  • I found the CoreWindow will be used in the DirectX , how can I get CoreWindow in the XAML?

    could we compiler RenderEngine based on DirectX into WinRT component dll, then used the dll in the c++ Metro style app? How to do it ?

    Wednesday, November 30, 2011 7:58 AM

Answers

All replies

  • Hi ZJ,

    I do not understand the question.  What problem are you trying to solve and what problem did you run into?

    CoreWindow is already available in the C# or C++ code as it is part of WinRT: http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.core.corewindow.aspx

    When using DirectX you do not need to compile it into a WinMD component.  Check out the DirectX samples listed at the top of this forum.

    -Jeff


    Jeff Sanders (MSFT)
    Wednesday, November 30, 2011 1:33 PM
    Moderator
  • Hi, jpsanders

       Sorry my question is not very clearly before. thank you for help me about following three questions.

      1. Actually, I want to use XAML to design UI,  and use DirectX to render on the XAML control, such  as Grid,Canvas,etc. How can I do it? 

      2.I hava write a Render Engine library based on DirectX9.0 and c++, How can I use the lib in the XAML and c++ Metro style app?

      3.Does the Metro style app only support DX11.1?

     

    Thursday, December 01, 2011 2:22 AM
  • Thanks for the clarifications Z!

    Today you cannot use DirectX to render on XAML elements.

    Metro Style applications will fall back to an older version of DirectX if DX11 is not installed on the system.

    -Jeff


    Jeff Sanders (MSFT)
    Thursday, December 01, 2011 4:29 PM
    Moderator
  • Is it possible to use DirectX to rendered on XAML elements later?

    Friday, December 02, 2011 3:05 AM
  • Sorry Z,

    I do not know.  Even if I did, I could not talk about a feature until it was announced publically!

    -Jeff


    Jeff Sanders (MSFT)
    Monday, December 05, 2011 1:01 PM
    Moderator
  • XAML interop with DirectX is supported as of the Consumer Preview release.  The XAML element you probably want is called SwapchainBackgroundPanel.  Use of this technique  is demonstrated in the sample called Simple3DGameXAML.
    • Proposed as answer by Filip Skakun Monday, March 26, 2012 4:29 PM
    Sunday, March 25, 2012 6:16 PM
  • Monday, March 26, 2012 8:01 PM