I am using Veldrid as the common 3D framework for an application that is required to be available in both UWP and WPF. I got it working fine with UWP by using UWP's SwapchainPanel control and Veldrid's SwapchainSource.CreateUwp method. However I'm stuck on figuring out how to get it embedded into a WPF application. All of the Veldrid samples create an entire window to host the DirectX 11 content. However I want just a control that can be dropped into a WPF page along with other controls. So something that looks like this:
<Grid>
<local:My3dVeldridControl />
</Grid>
I looked into D3DImage, but that only interops with DirectX 9, which Veldrid does not support.
Another option I'm trying to figure out is to create an ImageSource, but I don't know how to hook up Veldrid's backend to that source.
I also looked at WPFDXInterop, but it's all written in C++ and I'd like to keep all of my code in C#.
Does anyone know how to create a control like this to host DirectX 11 content in WPF, specifically for .NET Framework (customer requirement)?