Coding blog

Silverlight/WPF tip 1 : Disable XAML designer

If you do not have the chance to use Visual Studio 2012, you still have to suffer the vagaries of old designer. Heavy, slow and memory leaks, welcome to hell.

I propose two solutions to facilitate the modification of XAML files.

At first, I advise you to disable the automatic opening of the XAML editor. It is quite simple and it is provided by Visual Studio.

Here are the 3 steps:

  1. Go to the menu: Tools > Options
  2. Select: Text Editor> XAML> Miscellaneous
  3. Check the "Always open document in full XAML view" case in the "Default View" category.

This usually solves most of the issues. However, with large XAML files, primarily Resource Dictionnary files, there are still problems. Under Visual Studio 2008, you must restart VS after a few hours and with Visual Studio 2010, rarely more than a day.

So in those moments, I have a radical solution : completely disable the XAML interpreter and open XAML files in XML format.

However, I would not recommend this for a beginner and without Resharper tool style for the simple reason that you will lose a large part of the auto-completion.

Here is the procedure with 5 easy steps:

  1. Right click on a XAML file
  2. Open With...
  3. Select "XML (Text) Editor"
  4. Click "Set as Default"
  5. And confirm

You can easily cancel the operation by selecting "Automatic Editor Selector (XML)."