3

I searched for NuGet package for Win2d and only found something for UWP. Can we use Win2D in a WPF Core(3.1) project?

aybe
  • 15,516
  • 9
  • 57
  • 105
Eric Ouellet
  • 10,996
  • 11
  • 84
  • 119
  • Unlikely due to dependencies. What are you trying to accomplish? – TheBatman Feb 04 '20 at 18:17
  • 1
    Yes you can. If there are no direct dependency, you can create a UWP window that plays with Win2D, and use its handle to inject its content into a XAML asset for WPF core. You'll need to work a bit in term of interop (use the native user32.dll etc). – Soleil Feb 04 '20 at 19:49
  • @TheBatman, I want to do a graphic app which should have a similar look ar a uml diagram with thousands of graphics. – Eric Ouellet Feb 05 '20 at 00:39
  • @Soleil, seems very complicated... – Eric Ouellet Feb 05 '20 at 00:40
  • 1
    @EricOuellet I think It is simpler than injecting DX12 win32 into WPF. It seems that you can do this with XAML islands too: https://www.thomasclaudiushuber.com/2019/04/23/net-core-3-use-uwp-controls-in-wpf-with-xaml-islands/. Hence you got at least two alternatives here. I you would like to give a try to the UWP into WPF injection, let me know. – Soleil Feb 05 '20 at 01:07

0 Answers0