A major annoyance of mine after installing a new instance of Visual Studio is when I open a XAML document for the first time. By default, Visual Studio opens a XAML document in Preview mode (the design on the top and the code view on the bottom). As you start adding more and more elements to XAML, Visual Studio will render the XAML in the design view, even going as far as playing video back if you have a MediaElement defined.
The option to turn this off is buried in the Options. The below figures show how to change the default behavior.
First click Tools > Options.
Then navigate to Text Editor > XAML > Miscellaneous. Check the box that says Always open document in full XAML view. If you don’t see Text Editor in the options menu, check the box Show all settings in the bottom left of the Options window.
Related posts:



April 23rd, 2009 at 11:25 am
Agree, a very useful tip.BTW, you can set the default editor for xaml file to Source Code Editor (solution explorer->right click the xaml->open with…), this will even disable the Design tab.
April 23rd, 2009 at 12:10 pm
[...] Visual Studio Tip: Open XAML in code only mode Source: Silverlight made Simple Excerpt: [...]
April 23rd, 2009 at 12:40 pm
Ahh – excellent tip! The preview mode hasn’t worked in my silverlight application in a long time so I always collapse it right away anyways. BTW, anyone know how to fixed that? The preview just displays a blank (grey) page.
Thanks!
May 11th, 2009 at 2:32 pm
Cool
January 11th, 2011 at 1:12 pm
[...] for 2011-01-11 Visual Studio Tip: Open XAML in code only mode | Corey Schuman (tags: visualstudio xaml tips code view design) happy mailing : Blat online Command line dos smtp [...]
January 19th, 2011 at 7:35 am
Thank you so much for the excellent tip