I would like to create a UWP app (XAML) with C++/CX and DirectX 12 so that I can mix both XAML controls (things like Grid, buttons...) and DirectX, something like a Level Editor, but I'm struggling to find a way how to initialize DirectX to render inside a specific control (like a Grid).
The basic template and all the other tutorials only show how to do it within the full area of the application. When creating a device resource we set the window where to draw with SetWindow(CoreWindow::GetForCurrentThread());
Is there a way how to create a device resource with hwnd from a xaml control and is there a way how to get hwnd for a specific control?
For further reference, here is an official code example: https://blogs.msdn.microsoft.com/windowsappdev/2012/03/15/combining-xaml-and-directx/
The information in the article DirectX - Using XAML with DirectX and C++ in Windows Store Apps all applies to mixing Direct3D 11 or Direct3D 12 with XAML.