MoXAMLPowerToys

Inspired by the truly excellent XAML Power Toys from Karl Shifflett, I’m pleased to introduce MoXAMLPowerToys, which stands for More XAML Power Toys in deference to Karl’s excellent XAMLPowerToys. MoXAMLPowerToys is a Visual Studio addin, which is designed to enhance your productivity in Visual Studio. I have many plans for this utility, but I would love to hear any areas that you think you would like to see adding.

In this initial release, you can comment and uncomment XAML code. To use this addin, simply copy the addin file to C:\Users\xxx\Documents\Visual Studio 2008\Addins\MoXAMLPowerToys – For Testing.AddIn and edit it to point the Assembly at the addin dll.

Requirements

  • Visual Studio 2008 with SP1

Menus

MoXAMLPowerToys menu.
MoXAMLPowerToys menu.

Plans

Future versions of this code will include further productivity enhancements:

  • The ability to automatically assign standard command bindings to tags
  • Convert automatic properties into INotifyPropertyChanged
Advertisements

6 thoughts on “MoXAMLPowerToys

  1. Jacquers

    Cool stuff, thanks!

    I’m eager to see the future plans part implemented.

    Why don’t you collaborate with Karl and merge your efforts?

  2. peteohanlon

    Jacquers – I would love to collaborate with Karl, but he’s a really busy guy and we both work in different languages (me C#, Karl VB.NET) so merging the stuff together requires a bit of translation. I don’t see why they couldn’t be merged together at some point in the future, but for the moment, I’m continuing with this.

  3. Pete, the “MoXAMLPowerToys – For Testing.AddIn” file is not included in the project, and your installation instructions are not completely clear. At any rate, there is a link in the project to it, but it’s pointing somewhere on your hard disk.

    I did manage to install the “MoXAMLPowerToys.AddIn” file instead into the directory you mentioned (I had to create an “Addins” directory, but VS noticed it when I opened up the Addins Manager), and that did work.

    First of all, the embedding definitely works, so I’m happy about that. Not so sure I like the CDATA method, but I could get used to it. The problem is it’s still hard to tell what’s commented, especially when you have embedded comments.

    The biggest problem I have right now is that when you “undo” a MoXAML comment/uncomment, the block completely disappears! This is a bit frightening–you have to undo a second time to get back to the previous state. If this could be wrapped into a single undo operation that would be much nicer.

    I’ve only just tried it out a bit, so will give it a spin for some real work and let you know how it feels. Definitely better than the built-in xml commenting!

  4. peteohanlon

    Logan – this is what I get for uploading when I’m tired. The testing addin instructions will be clarified with the next release.

    The CDATA sections are something I’m working on. They were originally a thought that I could get away without having to do anything really clever to wrap the code, but I’ve been reimplementing them to use standard C style multi-line comments /* and */.

    I know what you mean about the undo, but I’m not sure if I’m going to be able to work round it. Basically, the code deletes the XML and replaces it with our custom comment. It’s a similar mechanism to the way Visual Studio implements auto-alignment when you press enter on the keyboard. Still – I’ll see if there’s anything that I can do.

    Right now, I’m busy refactoring the code out into a more extensible framework so that new commands can be added easily.

  5. peteohanlon

    The next update will feature the comments as to make it a little bit more obvious what they are. I’ve also rewritten part of the code to translate the selection text to comment text so that an undo operation only takes one action, and not two.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s