docs-desktop icon indicating copy to clipboard operation
docs-desktop copied to clipboard

Documentation needed for hosting WPF control in WinForms targeting .NET Core

Open MisinformedDNA opened this issue 3 years ago • 2 comments

The documentation for hosting a WPF control in WinForms is only given for .NET Framework. There needs to be parallel documentation for .NET Core.

For instance, the .NET Framework documentation says to

Add references to the following assemblies.

  • PresentationCore
  • PresentationFramework
  • System.Xaml
  • WindowsBase
  • WindowsFormsIntegration

But what is the equivalent in .NET Core?

I also took a look at the samples, but I don't see one where the WinForms app is targeting .NET Core.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

MisinformedDNA avatar Jul 19 '22 16:07 MisinformedDNA

@MisinformedDNA Thank you for creating this issue to track this request. You simply need to add <UseWPF>true</UseWPF> in your project file (under <PropertyGroup>) to pull in all the WPF libraries.

adegeo avatar Jul 20 '22 16:07 adegeo

OK. Thanks. I guessed that was all I needed, but I was experiencing another issue and couldn't find anything to confirm that that was all I needed. It would be nice for the documentation to explicitly call that out.

MisinformedDNA avatar Jul 20 '22 16:07 MisinformedDNA