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:
- Right-click on a toolbar and choose Customize…
- Select the Commands tab.
- Select the Context menu radio button. This will enable a combobox.
- From the combobox, select Editor Context Menus| XAML Editor. This will show the items in that context menu.
- Scroll down and select Copy.
- Click the Add Command… button. This will open the Add Command dialog.
- 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.
- 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…
- You can also click the Keyboard… button and set up a keyboard shortcut.
- Click the Close button.