This article applies to Visual Studio 2008, Visual Studio 2010, and Visual Studio 2012.
When you use Visual Studio to develop a WPF project, you may encounter the following confusion: when there are many open XAML designer windows, Visual Studio often has poor performance. This is especially true on some computers with average performance.
As we know, When you double-click a. XAML file in the WPF project, The XAML designer is opened by default. If you can double-click a. XAML file without enabling the XAML designer by default, opening the XAML designer when necessary can save a lot of time.
Of course, this can be achieved through Visual Studio settings. The method is as follows:
Main Menu: Tools | options...
In the left-side tree menu of Options dialog, select: Text Editor | XAML | miscellaneous.
Then we can see the checkbox:
Default view: always open documents in full XAML View
Select this checkbox.
:
After this setting, when we double-click the. XAML file, the default open is the XAML code, not the XAML designer. As shown in:
If you need XAML designer, you only need to switch to the design tab.
However, in Visual Studio 2008, this is the first time a designer is switched to a XAML designer, the designer cannot be normally displayed, as shown in:
Don't panic, everything goes well. Just click resume loading the designer to display the designer normally: