Visual Studio 2010 - XAML Editor Extraordinarily Slow

WpfVisual Studio-2010Visual StudioXamlDevexpress

Wpf Problem Overview


Has anyone else experience incredibly slow performance in the XAML editor in VS 2010? If I have a new project with a limited number of files, the performance is fine. However, if I have a project with a larger number of XAML files, the XAML editor hangs intermittently every few seconds, making it almost impossible to use.

I should also note that the performance is only slow in one particular project where I am referencing DevExpress 2010. I am not certain if this is related.

Any suggestions on solutions to this problem would be greatly appreciated.

Chris

Wpf Solutions


Solution 1 - Wpf

In Visual Studio 2012:

Go to

Tools > Options > TextEditor > XAML > Misc 

Check Always open documents in XAML view and uncheck Automatically populate toolbox items.

In Visual Studio 2015, 2017:

Go to

Tools > Options > XAML Designer 

uncheck Automatically populate toolbox items.

This fixed my same problem.

Solution 2 - Wpf

If you don't need the visual designer, you can select a different editor in visual studio:

Right click the xaml file -> Open With... -> Source Code (Text) Editor

You will only lose the split view, intellisense etc. should still work.
If you need to check something in the designer you can still click 'view designer' to open the normal XAML editor again.

If you want to improve the performance of the visual designer, try checking DesignerProperties.GetIsInDesignMode in your code-behind. The visualiser instantiates your controls to know how to display them, thus executing parts of the code-behind.

Solution 3 - Wpf

Like the OP, I had extreme lag in the xaml editor on a project that relied heavily on DevExpress WPF controls. After trying unsuccessfully to resolve this issue with the other solutions posted here, I eventually tried deleting my Solution User Options (.suo) file, which is usually located in the same folder as the solution (.sln) file. This immediately resolved the issue. You may want to read this post about what visual studio stores in the suo file so you can reset anything important (such as build configuration - mine always defaults the active solution platform back to "Mixed Platforms" for example)

Solution 4 - Wpf

Short answer: if you do not use designer much, just replace the default editor for XAML, thus getting rid of XAML visual designer and speeding things up. Right click any XAML file, click Open with... and choose another default editor. Source code (text) editor works just fine.

Now it should be already fine. If you want to understand the details and completely get rid of the slow designer, read the long answer.

Long answer: Here is a nice explanation of what happens and why is it that slow.

A brief todo based on the aforementioned article in order to completely disable the visual designer of XAML:

  1. Under Tools->Options->Text Editor->XAML->Miscellaneous->Default View check Always open documents in full XAML view
  2. Open Task manager and end XAML Designer process XDesProc.exe (Note: for VS2013 right click this process and go to containing folder. Rename the exe to sth else, than end the process)
  3. Standard XAML editor will load this process again (I guess it will not succeed with VS2013 and actions done in P.2). However, right click any XAML file, Open with... and choose another default editor. Source code (text) editor works just fine.

Solution 5 - Wpf

While using dev express, I've noticed some laggy response in the Visual Studio designer. This appears to be due to the license authentication of the DevExpress products.

If you delete the "Licenses.Licx" file (found in the project properties folder) you'll notice a marked improvement in performance.

Note: Removing the license file doesn't stop you from using DevExpress controls. But it does stop VS from constantly authenticating it.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChrisView Question on Stackoverflow
Solution 1 - WpfJalalView Answer on Stackoverflow
Solution 2 - WpfCaptain GarforceView Answer on Stackoverflow
Solution 3 - WpfErikestView Answer on Stackoverflow
Solution 4 - WpfMaxim ZabolotskikhView Answer on Stackoverflow
Solution 5 - WpfCr1spyView Answer on Stackoverflow