I am having trouble viewing my custom user controls in the XAML Designer.
I have multiple custom WPF user controls from multiple different projects that I am loading into a WPF App window in a separate project. I am able to create them in the XAML code but they only show up as blank outlines in the designer. There are no errors, and when I build and run the WPF application the user controls show up properly.
This is only happening with WPF user controls from separate projects. If I create a user control in the same project it displays properly in the designer. It also seems to only be happening with user controls built for x64. If I build the user controls for x86 and load them into a WPF application built for x86, everything displays properly.
I am running Visual Studio 2019 v 16.2 on Windows 10, using .NET 4.5. My platform target is x64. I am attempting to build the user controls in Class Libraries (.NET Framework) and use them in a WPF App (.NET Framework).
Seems to be a Visual Studio problem, which is already known since one year. No chances or updates.
For VS2019:
you can enable the new WPF .NET Framework designer by checking the “Environment\Preview Features\New WPF XAML Designer for .NET Framework (requires restart)” checkbox in Tools > Options. The new designer has better support for 64-bit projects.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.