How to get rid of the XAML Design view inside Visual Studio IDE?


If you work in XAML pages, sometime you might noticed that the XAML page freezes for sometime while opening the page in design view. This is very annoying and many time it is responsible to crash the Visual Studio IDE. So what to do?

 

If you use Expression Blend to design the XAML page or don't want to open the XAML in design view, this small tip will help you to improve the performance of the IDE. Read more to know.

 

If you noticed that your Visual Studio IDE freezes or crashes while opening any XAML file, just follow the below mentioned steps to enable the IDE to open the page always in XAML view instead of the Design view.

 

Inside the Visual Studio IDE, go to the Tools menu and click on the "Options" menu item to open up the options dialog as shown below:

 

Open Tools menu - Options

 

Inside the options dialog, expand the "Text Editor" tree item and find out the XAML tree as shown below. Expand the XAML tree item too and select the "Miscellaneous" item. This will open the miscellaneous tab in the right panel. Find out the section called "Default View" and make sure that the checkbox titled "Always open documents in full XAML view" is checked; if not, just check it to enable the feature. Click "OK" to save the settings.

 

Change Settings to Open the documents in full XAML view

 

Now, whenever you open any XAML file in Visual Studio, it will open that in full XAML view and make your IDE responsive. Hope this tip help you to improve your productivity. If this helped you, please drop a line below and help me to come with some other new tips for you. Enjoy coding...


11 comments

  1. Unfortunately this doesn't change the behavior of the keyboard shortcut to the designer - i.e. if you're in the code editor and press Shift - F7 (that is the default shortcut to go to the designer) it still opens in design view, not in XAML view. If you find a way to change this, I'd be grateful :).

    ReplyDelete
  2. Yes Peter, pressing Shift + F7 will load the XAML designer. This is default behavior. Regarding your query... why do you want to open the XAML view from the XAML view itself? Or, do you want to override the keys not to open the design view?

    ReplyDelete
  3. I liked the curvacious redlined callouts and the pointer. What tool and feature did you use to do the graphics for this presentation?

    ReplyDelete
  4. Hi Kunal. What I meant is switching from code behind (C#) to the XAML view. Try it out: if you have both files open (the XAML file and the C# code behind file), and you are in the C# code, press Shift-F7 (which is the default shortcut to switch to desing view). Visual Studio will then switch to the visual designer instead of the XAML view, even if you have the option "always open documents in full XAML view" set. You have to press Shift-F7 again to switch from the visual designer to XAML. I haven't found a way to change/suppress this.
    -Peter

    ReplyDelete
  5. Hi Peter,
    I don't think this can be achievable as this is the functionality of the IDE. If that was just a shortcut, yes you can change. But here your question is different and I verified this. No, till now you can't do much on this! :doh:

    ReplyDelete
  6. Hi kunal ji,
    can i know the differences in among silverlightusercontrol.xaml,page.xaml,application.xaml, resoursedictionarypage.xaml pages ?
    these pages will get when we add a new item to our project ?
    so i will be thank full if you let me know which page is mentioned for what purpose?

    ReplyDelete
  7. Please put an article suggestion here: http://www.kunal-chowdhury.com/p/forum.html and I will get back to you shortly.

    ReplyDelete
  8. Thnx for the Tip Kunal.

    It is helping me a lot to save my dev. time.

    -Shiva

    ReplyDelete
  9. Hello Shiva,
    Glad to hear that, this tip improved your productivity time. Thanks for sharing your feedback.

    ReplyDelete
  10. This doesn't fix the responsiveness. I'm pretty sure that the designer still initializes itself and loads the XAML even though the designer isn't showing.

    ReplyDelete
  11. Damn! Excellent Illustration! Fast to see, Immediately understood!
    Thanks Kunal!

    ReplyDelete


 
© 2008-2014 Kunal-Chowdhury.com | Designed by Kunal Chowdhury
Back to top