Copy XAML as HTML in VS2010

CopySourceAsHtml is a Visual Studio Add-in originally from JTLeigh and Associates, now available from Codeplex. Although testing is not complete it does seem to work with the beta of VS2010, and a patched MSI is available from http://copysourceashtml.codeplex.com/SourceControl/PatchList.aspx

However, Copy As HTML is conspicuously absent from the context menu for the XAML editor. To correct this, follow these steps:

  1. Right-click on a toolbar and choose Customize…
  2. Select the Commands tab.
  3. Select the Context menu radio button. This will enable a combobox.
  4. From the combobox, select Editor Context Menus| XAML Editor. This will show the items in that context menu.
  5. Scroll down and select Copy.
    image
  6. Click the Add Command… button. This will open the Add Command dialog.
  7. Select Addins from the list of categories. This will show the list of commands available from add-ins, which should contain four items from JTLeigh.
  8. Select JTLeigh.Tools.Development.CopySourceAsHtml.Connect.CopyNow and click the OK button. This will cause CopyNow to appear just above Copy in the context menu but for some reason it will end up just before Run… 
  9. You can also click the Keyboard… button and set up a keyboard shortcut.
  10. Click the Close button.
Published 01-11-2010 10:09 by peterw