Go Beyond Built-in with Extensibility in WebMatrix 2 Beta

WebMatrix 2 Beta offers extensibility points that enable you to customize how you create, manage, and use web applications.

In This Article

Core Application Extensibility (top)

WebMatrix offers a number of extensibility points, such as dialogs, ribbon buttons, context menus and editor features. These extensibility points allow you to build new features for WebMatrix. The controls inherit the parent's look and feel (unless you specify otherwise), which means that they will feel natural to users.

Available Extensibility Points (top)

  • Look up the site's local path, URL, and application identifier.
  • Look up the currently active workspace (Site, Files, Databases, or Reports)
  • Add items to the Site workspace dashboard.
  • Add groups and buttons to the ribbon.
  • Add a dialog box.
  • Add a shortcut menu for when a user right-clicks a file in the Files workspace.
  • Add status information to the notification bar.
  • In the editor, get and modify selected text in the active open file.
  • In the editor, get the location of the insertion point and insert text in the active open file.

The APIs available in Beta are subject to change in future releases of WebMatrix 2 and will not be final until our RTW release.

Creating an Extensions (top)

  1. Download the WebMatrix extension Visual Studio project template here.
  2. In Visual Studio, create a new project using the extension template.
  3. To get an idea of how to create the extension, look at the readme.txt and WebMatrixExtension.cs files.
  4. Create the extension code.
  5. Build the extension. The files are automatically copied to the directory where WebMatrix knows to look for them and load them at startup.

Adding your Extension to WebMatrix (top)

If you don't use the Visual Studio extension template, you can create an extension manually. These instructions also help you copy a new extension to a different computer.

  1. Open C:\Users\<UsernameHere>\AppData\Local\Microsoft\WebMatrix\Components.
  2. In this folder, create a new subfolder named <ExtensionName> and copy the *.dlls for your extension into this folder.
  3. Open WebMatrix. If it's already open, close it and reopen it.

Help extensibility (top)

WebMatrix has a Help pane that shows relevant links when certain actions (called triggers) occur. Examples of triggers include creating a new file, creating a new database, or editing a file. These triggers allow WebMatrix to give users context-aware Help.

Content providers can share an XML feed of articles that are displayed when triggers occur. This can increase the number of users who see their content.

To start adding a help feed, go here.

We'd love to hear your feedback, questions or feature requests, so please check out our new forum for extensibility.


Learn More about WebMatrix 2 Beta

If you want to learn more about other great features in WebMatrix 2 Beta, check out some of these articles:

You can discuss this article using the adjacent Facebook talkback.

For technical questions please visit our discussion forums, where we have a vibrant community of developers like you, as well as Microsoft engineers who are ready to answer your questions!