Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at
An Essential Tip for Working With XAML

Most WPF and Silverlight devs already know to turn off the default design view for XAML. I don’t ever use the designer in Visual Studio for either Silverlight or WPF. My apologies to the team that worked on it, but it is a hindrance and not a help. When I give presentations, my audiences are often surprised to discover how much XAML I edit manually. Now, I do use both Blend and Kaxaml quite a bit, but never the builtin designer.

In case you don’t know how to disable the design view (the option is buried somewhat):

Tools > Options > Text Editor > XAML > Miscellaneous

Then check “Always open documents in full XAML view

Other Troubles

I upgraded to 64-bit Vista a month or so back, and despite the positive experience overall, I had one very frustrating problem. Frequently, when I worked with a XAML file, Visual Studio would get all wonky. It only seemed to affect a single XAML file at a time, even if I had a dozen open. VS being wonkyI could reset the troubled file by closing it and opening it again. The problem usually started with my scrollbar failing to repaint. At first I was fearful that it might be related to ReSharper (which has awesome XAML features BTW). Then I suspected my video drivers (which I still do actually). Nevertheless, I didn’t find a solution.

Fortunately, Fabrice Marquerie (of LINQ in Action fame) made this very useful post on his site a few days.

Fabrice discovered an excellent trick: using the Source Code Editor for XAML. It’s really fast and you have all of the same features as the default XAML editor. The only thing you lose it the Design tab at the bottom. And hey, if you really need it, it’s only a right-click away!

Here’s the instructions copied from his blog:

  1. Right-click on a XAML file in the Solution Explorer
  2. Select "Open With..."
  3. Select "Source Code (Text) Editor"
  4. Click on "Set as Default"
  5. Click OK
  6. You're done!

Trust me, if you work with XAML, you’ll want to do this.

Posted 02-04-2009 9:51 AM by Christopher Bennage


About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)