docs-desktop
docs-desktop copied to clipboard
Documentation needed for hosting WPF control in WinForms targeting .NET Core
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.
- ID: 99a8cc96-49a1-090f-5bae-e5ba59cce3b8
- Version Independent ID: cf31a26a-bd40-3cc7-93ea-3771a0c4e863
- Content: Host a WPF composite control in Windows Forms
- Content Source: dotnet-desktop-guide/framework/wpf/advanced/walkthrough-hosting-a-wpf-composite-control-in-windows-forms.md
- Product: dotnet-framework
- Technology: dotnet-wpf
- GitHub Login: @adegeo
- Microsoft Alias: adegeo
@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.
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.