Welcome to MSDN Blogs Sign in | Join | Help

Having Fun with the New Editor in VS 2010

I was figuring out how to test the new WPF editor through the new managed API and it suddenly occurred to me how easy it is to do things to the editor that just weren’t possible before. For example, I decided that I like my editor rotated:

image

Why? Because I can!

public void RotateEditor(int degrees)
{
    var textView = GetWpfTextView();
    textView.VisualElement.LayoutTransform = new RotateTransform(degrees);
}

What amazed me is that it continued to work just fine – I was expecting to find a ton of bugs this way, but things just continued to work seamlessly. And my test did this to the running instance of Visual Studio without even changing anything – I injected the above method in the VS main AppDomain and ran it on a currently opened document.

Apart from meaningless entertainment “just for fun” you can do so much more useful stuff. For example, it’s super easy to insert images right into the editor:

imageinsertion_01.png

A friend of mine will soon be publishing a spell-checker add-in for XML comments that was very easy to write.

You can find more samples and information about the new editor at the following locations:

And finally, don’t forget to follow the New Editor on Twitter: http://twitter.com/vseditor

Published Tuesday, July 14, 2009 6:03 PM by Kirill Osenkov
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Having Fun with the New Editor in VS 2010

Thursday, July 16, 2009 8:54 AM by markheath

brilliant! should be good for an April fool's day prank!

thanks for the useful links too

# re: Having Fun with the New Editor in VS 2010

Friday, July 17, 2009 7:36 PM by Morten

What I really want to see is WYSIWYG code comments/editor so the XML comments you see is rendered the exact same way as in the autogenerated help files. Would help us greatly to create better doc

# re: Having Fun with the New Editor in VS 2010

Friday, July 17, 2009 7:45 PM by redsquare

Lets hope this feature is a sure fire sign that all the speed issues have been fixed and the team are rolling out nice to haves.

# re: Having Fun with the New Editor in VS 2010

Friday, July 17, 2009 7:53 PM by Kirill Osenkov

Morten: it's possible that we can get this an an editor extension at some point. The beauty of this is that the community is now enabled to build it themselves, even if the editor team doesn't do it.

redsquare: we're still tackling performance, it's our top priority right now. What I posted is just a 5-min prototype to test out the flexibility of the new editor. It's not a feature. The flexibility is just a side effect of the editor being rewritten in managed code.

# re: Having Fun with the New Editor in VS 2010

Tuesday, August 04, 2009 7:57 PM by Josh

VS2010 looks really good from what I've seen so far. As Mark alluded to above, this 'side effect' will make a nice "WTF? on video" moment for a work mate or two.

# re: Having Fun with the New Editor in VS 2010

Wednesday, August 05, 2009 5:34 PM by Lars

If the performance is worse then 2008 I don't think I could use it.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker