3.5 features: Addins

In 3.0, we received a number of queries regarding creating plugins. So in 3.5 we got this in .. :) .. Creating an adding would bsically need the use of 3 dlls - System.Addin, System.Addin.Contract, System.Presentation

The basic steps to create the addins involves creating a contract, then create the corresponding views and adapsters for both the host and the addin. So in total you will be creating 5 dlls in addition to the app and the actual addin. Even though this looks  a bit overwhelming, its pretty simple. http://blogs.msdn.com/clraddins/ gives more information about creating addins.

In order to try out this framework, I added the addin support to blogpad with the host being able to set text in the addins...

So the app basically has an addin for a calculator (which can be removed) and an ad at the side... You can try out the code that is attached.. FYI, the ad plugin links to an xbap and this line is commented in code.. You might want to point it to a legit xbap to get this plugin working. The host can set the tooltip on the plugins. This may be simplistic but it shows one way communication from the host to the addin. If you need the addins to call APIs form the host you would basically need to duplicate the same structure in the reverse.


Share this post