Creating a Windows Live Writer Plug-in using C# Part 1

There are a few example out there already for ContentSource but after trying to use them I found some glaring omissions.  For instance, two of the examples I looked at use InsertForm.  I just assumed that because we were using the namespace System.Windows.Forms that is where it was coming from.  Because the example were in the 2.0 Framework I thought maybe I was just missing some thing.  So when I got the error “The type or namespace name ‘InsertForm’ could not be found (are you missing a using directive or an assembly reference?)” I assumed it was just a matter of finding the reference I needed.  It was!  But to a class I should and would create.  I also had a hard time with the ImagePath property of the WriterPlugin attribute.  For starters the png file must be 16×16 despite what the documentation says, 20×18 didn’t work.  Also don’t forget to set the Build Action property on the image to Embedded Resource.  Its a minor detail that the documentation has but the examples leave out.  Please don’t go looking for a SDK to download despite what is said in the other example.  The WindowsLive.Writer.Api is in the root directory of WindowsLive Writer.

To Summarize:

  1. Your project will need a Windows Form Class added (Name if “InsertForm.cs” just for the fun of it)
  2. Make sure your image is 16×16.
  3. Make sure you set the Build Action on the image to Embedded Resource.
  4. The WindowsLive.Writer.Api file is found in C:\Program Files\Windows Live\Writer
  5. WindowsLive Writer SDK Documents

In Part 2 of this post I will share the plug-in I create and use it in the post.

Leave a Reply

Your email address will not be published. Required fields are marked *