AddInMenuItem.IconImageSource

An optional ImageSource you can bind as the toolbar icon. You can use any image source, but in most cases you are likely to bind to an ImageSource of an internal image resource contained in your addin's assembly.

To do this you can use code like the following: cs menuitem.iconimagesource = new imagesourceconverter() .convertfromstring("pack://application:,,,/pandocmarkdownparseraddin;component/icon_22.png") as imagesource


 You can also use a customize font awesome icon like this:

 The pack string is in the format of:

**"pack://application:,,,/assemblyName;component/relativeImagePath.ext"**

Note the **component/** which is the application root so make sure you start your project relative path from there.
public ImageSource IconImageSource { get; set; }

See also:

Class AddInMenuItem

© West Wind Technologies, 2019 • Updated: 01/06/19
Comment or report problem with topic