the blend addin class 9

Posted by Karim on July 11, 2008

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

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

More discovery needs to be done.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Srikanth Mujjiga Wed, 16 Jul 2008 03:55:24 UTC

    Dear sir,
    I am using Silverlight 2 Beta 2. The Silverlight SDK does not have Microsoft.Expression.Framework.AddIn dll. Can you please help as I am currently working in trying to customize Expression Blend.

    Thanks in advance.

  2. dragonshed Wed, 16 Jul 2008 10:22:57 UTC

    @ Srikanth

    The interface IAddIn is part of the assembly Microsoft.Expression.Framework.dll which is installed with blend. I’m using the Blend 2.5 June 2008 Preview, so on my system it is located in %PROGRAMFILES%\Microsoft Expression\Blend 2.5 June 2008 Preview\.

    Hope this helps

  3. Rob Burke Fri, 01 Aug 2008 08:19:05 UTC

    Excellent find!! I was wondering if an add-in infrastructure existed for Blend.

  4. Ben Hoffman Fri, 08 Aug 2008 15:12:03 UTC

    I have been waiting for an extensibility infrastructure for Blend for quite some time – very glad you dropped this little nugget, did Microsoft publish this API?

  5. Karim Wed, 13 Aug 2008 12:00:17 UTC

    @Ben Hoffman, Microsoft hasn’t published any of the blend APIs as far as I’m aware. I’ve discovered the knowledge in this post, and a handful of other useful blend tidbits, by using Lutz Roeder’s .NET Reflector.

  6. bitbonk Wed, 22 Oct 2008 04:48:47 UTC

    Did you know that belnd also supports some of the wpf designtime extensibility features of viusal studio (only roperty Editors, Metadata loading and Licensing) as described here:

    msdn.microsoft.com/en-us/library/bb546938.aspx

    and as discussed here:

    social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/thread/899cbed8-3fac-49c5-b735-083e47c73327/

  7. TaunnyMam Wed, 31 Mar 2010 12:14:47 UTC

    Howdy i am new here. Hopefully i will be able to contribute to this board, Just though id come to say hey!

    thank you.

  8. nomoreaccidents Tue, 20 Apr 2010 13:23:46 UTC

    Long time lurker, thought I would say hello! I really dont post much but thanks for the good times I have here. Love this place..

    When I was hurt in that automobile accident my life would be changed for all time. Unfortunately that driver had no car insurance and I was going to be in pain for ever.

    This was not time for me to start and guess what to do. I had to find a good lawyer to help me get what I needed. After all, my family was counting on me.

    How dreadful was it? I has bedridden for 9 months, I had to have constant care and my hospital bills went through the roof!

    Gratefully, I found a good referral site to help me.

    I will post more later this week to tell you more about what I have been going through.

    If you need an accident lawyer try the guys at accident lawyers
    >

  9. Tiesialuaxene Wed, 01 Sep 2010 05:06:56 UTC

    Attitude shoes look out for to be precious, but yours doesn’t would rather to be that way. As long as you’re zealous to buck a hardly traditions (who says you get to aficionado of them, anyway?), you’ll beyond the shadow of a doubt scrape a bale with
    these choice shopping ideas.

    Overlook the latest fishion shape
    My objections to the latest fishion cut shoes are as much about the birth ones as cost. Out if you don’t share out my moralizing views on the outgoing of conflict/blood diamonds, it’s a incident that you choice shield thousands of dollars by not buying a latest fishion style. for the treatment of example, Look for everyone payment Christian Louboutin Delic Probe Shoes or Christian Louboutin Black patent leather 100 Pigalle pumps. They’re less costly and objective as pleasing as the latest ones.

    Machine shop approximately to a budget-friendly shoes
    The supreme shoes arn’t unmatched unless you look and atmosphere abundant in it. How mammoth would you get if it’s modus operandi to the ground your budget? Satisfied, it’s yoursignal shoes, but your finances won’t trade you a sovereign pass to overspend. Liberate your age to look hither, and be unhindered to utilized Christian Louboutin shoes, nautical samples, and renting. There is a adroit shoes at any sacrifice range. Sooner or later, you’ll rouse only that you can dearest and afford. (Extra, a wardrobe malfunction won’t hurt as much with your budget shoes!)

    Cut down back on the shoes
    You can dish to hundreds of dollars with a view your shoes, but they’ll but be overshadowed during your hair, makeup, and dress. Unless you organize the readies to smoulder, you may covet to reconsider spending a fortune honourable on the footwear. A tacky mate of Christian Louboutin strappy sandals would press bantam incongruity on your important daytime, but the in dough saved would definitely nick your pocketbook exist easier.

    Grasp the shoes in a online aggregate
    Most online stores disposition lay down a enormous disscount benefit of the Christian Louboutin Shoes than entity shops, shipping shipping is unruffled free. such us http://www.uChristianLouboutin.com, they have a all of Christian
    Louboutin and ugg boots on transaction marked down, all are unrestricted shipping now.

    Ask your friends to mitigate
    In the practice of planning your shopping, you’ll chance that you deal with a lot of determination, from the shoes fashionableness and shoes settle to shoes mateerial. Don’t be pusillanimous tinterrogate your friends and relatives in return arrogate if they fool the skills to mitigate you to choice. If you’re irresolute to secure your friends incorporate on your blending period, you can stilly depart to them for the sake recommendations. Their connections may steady buy you a discount.

    Deliver the shipping suited for later
    Sure, it would be winsome to provoke into the sunset with Fair-minded Toe-holdsoundless painted on your pile’s tag end window, but are you getting the pre-eminent extent in the interest of your shipping? Although it’s purposes easier to listing shipping once upon a time if your dough tout de suite follows you, you muscle miss into public notice on opportunities to save because the timing isn’t right. Be undefended to delaying your shipping days until you can tolerate sway of discounts, coupons, and other deals.

Comments