by brad
23. April 2009 20:06
Once upon a time, when working with ASP.NET WebForms, you could change class names and control names all you wanted in C# (using F2 – Rename) and your .ASPX markup would remain distressingly un-renamed.
It probably still works that way with WebForms, but for Silverlight projects, Visual Studio 2008 can handle peeking into your XAML to find things to rename. I don’t know how long it’s been doing this, but it was a pleasant surprise when I first noticed.
Take this value converter for example … DoubleRounderValueConverter.
And this reference to it in my XAML:
Now let’s F2 – Rename it.
![CropperCapture[7] CropperCapture[7]](http://www.codebadger.com/blog/legacy/images/VisualStudiosgettingsmarterRenaminginCan_11ACB/CropperCapture7_thumb.jpg)
Naturally, it ends up renamed in C#
But to my delight, it is ALSO renamed in XAML. The name is still the original, but that’s okay. The important part is the class name.
This is going to save me a ton of time. (That I can spend copying and pasting Visual Studio screenshots into Windows LiveWriter to make blog posts about how I’m saving time.)
e88f4b88-f5b6-496d-8fed-2a9e70ddaf4a|0|.0
Tags: