Xaml UI Designer is inactive for wpf projects in .

2020-04-08 12:11发布

问题:

I have updated Visual Studio 2019 to version 16.3 which can support .Net Core 3 stable version.

After creating the first WPF app supported by .Net Core 3, the designer is inactive while the XAML designer is enabled in Tools=>Option=>XAML Designer.

How is it possible to activate the UI Designer in Visual Studio 16.3?

An image describing the problem visually has been attached to the question.

回答1:

Try “Tools” > “Options” > “Environment” > “Preview Features” and check the option “Use previews of the .NET SDK”. Then restart Visual Studio. (https://developercommunity.visualstudio.com/content/problem/745513/xaml-designer-does-not-load-in-visual-studio-2019.html)



回答2:

I ran into this same issue with Visual Studio Community 2019 Version 16.4.3 and a .NET Core 3.1 WPF project.

It turns out that JetBrains ReSharper was causing the problem as it automatically disables the XAML Designer. To change this behavior, navigate to Extensions/ReSharper/Options, search for Disable XAML designer and set the Action dropdown to Ignore.

Then, as Jon mentioned, make sure to check Enable XAML Designer under Tools/Options/XAML Designer. Restart Visual Studio and you should be good to go.



回答3:

If the above options do not work, look under Tools/Options/XAML Designer, check Enable XAML Designer. I could not get that setting to save until I started VS as admin, then it finally saved.

However, for me, it still doesn't work. But it seems to have something to do with this setting having issues. Odd thing is, on another system I use, it works fine.