Sunday 13 April 2014


Share/Bookmark
Issue: 

You all may have experienced an annoying behavior of visual studio while developing WPF XAML.
Say for example Visual Studio consumes large amounts of memory and shows Not Responding message on a regular basis while designing XAML
This is because of the XAML designer (Microsoft Visual Studio XAML UI Designer) which visual studio loads while editing XAML. There will be one for each XAML that you open for editing.


How did I fix it:

While developing XAML, we rarely looks at the designer and we tend to rely on our expertise in writing XAML. If you are also the one who don’t rely on XAML designer, then you can ask visual studio to not to load designer and thereby saving a lot of memory thereby avoid visual studio crash because of out of memory.

Below described are the steps which you have to follow to avoid loading XAML designer.

1. In visual studio, go to Tools –> Options menu,
2. Open the Text Editor node, then the XAML node,
3. Then select the Miscellaneous node; make sure that under the Default View heading there is a checkbox beside Always open documents in full XAML view.

4. Go to solution explorer -> Right click on any .xaml and say open with. Now select Source Code (Text) Editor and set it as default.

Restart visual studio and enjoy a new development experience.
Here if you look at the task manager, you still can see one xaml designer running (Microsoft Visual Studio XAML UI Designer). This is required by visual studio for compilation purpose so just ignore it.
Categories: ,

0 comments:

Post a Comment

Dear reader, Your comment is always appreciated. I will reply to your queries as soon as possible.

1. Make sure to click on the Subscribe By Email link to be notified of follow up comments and replies. Or you can use Subscribe to: Post Comments (Atom) link.
2. Only English comments shall be approved.
3. Please make your comments self-explanatory. Comment in such a way that it explains the comment so that a counter question can be avoided and can be replied with proper answer on the first go.