I have no clue how long this feature/option has been around but my mouse happened to pause over this button within the WPF designer early and now I'm curious what it's purpose is.
Hovering over the button, Visual Studio pops up a tooltip that says Enable project code. When I click on it, the designer seems to reload the xaml contents but I can't tell what's changed.
What does this feature do?
2020 EDIT
It's been years since I've had to work in XAML, but I've received a new project where I need to work in XAML. This feature/button seems to have disappeared. Where has it migrated?
In Visual Studio 2015/2017/2019/2022: In the Tools -> Otions menu, open the XAML Designer node, then uncheck "Enable XAML Designer"
To open this page, choose the Tools menu and then choose Options. To access the XAML Designer property page, choose the XAML Designer node. Settings for the XAML Designer are applied when you open the document. So, if you make changes to the settings, you need to close and then reopen Visual Studio to see the changes.
WPF, stands for Windows Presentation Foundation is a development framework and a sub-system of . NET Framework. WPF is used to build Windows client applications that run on Windows operating system. WPF uses XAML as its frontend language and C# as its backend languages.
Windows Presentation Foundation (WPF) and XAML combine into a rich presentation system for building Windows desktop applications with visually stunning user experiences that incorporate UI, media, and complex business models.
What does this feature do?
It enables or prevents the designer from running your code in the background.
Disabling project code can lead to a loss of design time data and enabling it can lead to unhandled exceptions in the XAML designer. These exceptions are usually caused by code that attempts to access properties or methods which work differently when your application is running in the designer compared to when it runs as a built executable.
Debugging or Disabling Project Code in XAML Designer: https://msdn.microsoft.com/en-us/library/mt622752.aspx?f=255&MSPPError=-2147217396
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With