I'm trying to implement DirectX 11 using SharpDX 2.5 into WPF. Sadly http://directx4wpf.codeplex.com/ and http://sharpdxwpf.codeplex.com/ don't work properly with SharpDX 2.5. I was also not able to port the WPFHost DX10 sample to DX11 and the full code package of this example is down: http://www.indiedev.de/wiki/DirectX_in_WPF_integrieren
Can someone suggest another way of implementing?
SharpDX supports WPF via SharpDXElement.
Take a look in the Samples repository at the Toolkit.sln
- all projects that have WPF
in their name use SharpDXElement
as rendering surface:
MiniCube.WPF
- demonstrates basic SharpDX-WPF integration;MiniCube.SwitchContext.WPF
- demonstrates basic scenario when lifetime of the Game instance is different from the lifetime of SharpDXElement (in other words - when there is need to switch game rendering on another surface).MiniCube.SwitchContext.WPF.MVVM
- same as above, but more 'MVVM-way'.Update: SharpDX.Toolkit has been deprecated and it is not maintained anymore. It is moved to a separate repository. The Toolkit samples were deleted, however I changed the link to a changeset where they are still present.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With