Christopher Bennage

Sponsors

The Lounge

Wicked Cool Jobs

Syndication

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 imagehelp@codebetter.com
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

[Advertisement]

Comments

Rob Eisenberg wrote re: An Essential Tip for Working With XAML
on 02-04-2009 11:47 AM
I've had the same redraw issues on Windows 7 64 as well. This solution fixed the problem.
Dew Drop - February 4, 2009 | Alvin Ashcraft's Morning Dew wrote Dew Drop - February 4, 2009 | Alvin Ashcraft's Morning Dew
on 02-04-2009 11:59 AM

Pingback from  Dew Drop - February 4, 2009 | Alvin Ashcraft's Morning Dew

Ayende Rahien wrote re: An Essential Tip for Working With XAML
on 02-04-2009 12:16 PM
Thanks, now it is REALLY fast.
Michael C. Neel wrote re: An Essential Tip for Working With XAML
on 02-04-2009 5:41 PM
That is awesome - a great tip (I never use the design tab either).
DotNetKicks.com wrote An Essential Tip for Working With XAML
on 02-12-2009 3:56 PM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Web Development Community wrote An Essential Tip for Working With XAML - Christopher Bennage
on 02-13-2009 4:46 AM

You are voted (great) - Trackback from Web Development Community

Michael Sync wrote re: An Essential Tip for Working With XAML
on 02-17-2009 11:32 AM
Thanks a lot for the tip..
Dave Britton wrote re: An Essential Tip for Working With XAML
on 02-17-2009 2:38 PM
I'd also suggest using the document outline with this.
Community Blogs wrote Silverlight Cream for February 17, 2009 -- #520
on 02-17-2009 5:21 PM

In this issue: Maurice de Beijer, Terence Tsang, Christopher Bennage, Lee, and Dave Campbell Shoutouts

The Cave » Blog Archive » XAML Designer and Kaxaml wrote The Cave » Blog Archive » XAML Designer and Kaxaml
on 02-28-2009 2:19 AM

Pingback from  The Cave  » Blog Archive   » XAML Designer and Kaxaml

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)

CodeBetter.Com