Archive Page 2

the blend addin class

I discovered, much to my surprise, that Blend 2 has the necessary infrastructure to support rudimentary custom extensions.  The extensions take the form of a class which implements the public interface Microsoft.Expression.Framework.AddIn.IAddIn.

Inline is a very simple HelloWorld sample.

AddInDescription("HelloWorld", AddInCategory.Tool)]
public class HelloWorld : IAddIn
{
    public void Initialize(IApplicationService 
      applicationService) {}

    public void StartupComplete()
    {
        // Show we were here
        System.Windows.MessageBox.Show("Hi");
    }

    public void ShuttingDown() {}

    IDisposable Members
}

AddIns are hooked on startup, specified as command line arguments:
path\to\blend.exe /addin:HelloWorld.dll

blend addin test

blend addin hello world

When initialized, an Application ServiceProvider object reference is passed, which contains accessors to all the major service provider objects of Blend.  Through this, it’s possible to add custom menus and dialogs, possibly even panels, to Blend.

I expect there are alot of limitations.  The most glaring is loading Addins only by specifying them as commandline arguments. Much of Blend is internal and/or sealed, including Nautilus (Blend’s code editor), Visual Studio abstractions for Projects, Solutions, and the Build system.  Enough remains open to allow for some customization of existing features, and certainly for new features.

menu and dialog inside blend

An annoying custom menu and dialog inside blend

More discovery needs to be done.

« Previous Page


 

November 2009
S M T W T F S
« Feb    
1234567
891011121314
15161718192021
22232425262728
2930  

about

Karim Hernandez is a dev at IdentityMine, building software using WPF and Silverlight.

profiles