Tuesday, 14 September 2010

Adding icons to views and folders in Service Manager

To add a custom icon to a folder (and a view with similar edits) in Service Manager do the following:
N.B. This assumes you know how to create a management pack to create folders and views in the console.

Place your custom icon as a png file in the same folder as your management pack and name it something sensible (mobilephone16x16.png in this example)

Add a new category to your MP to categorize the Image Resource. Add one for both 16x16 and 32x32 icons if you're going to use both sizes

<Category ID="Category.MobilePhoneFolderImage16x16" Target="Image.MobilePhoneFolder.16x16" Value="System!System.Internal.ManagementPack.Images.u16x16Icon" />

Alter your folder to use the image:

<ImageReference ElementID="Folder.Mobiles" ImageID="Image.MobilePhoneFolder.16x16" />

Reference the custom image for use in the MP in the Resources section

    <Image ID="Image.MobilePhoneFolder.16x16" Accessibility="Public" FileName="mobilephone16x16.png" />

Use powershell to create a management pack bundle, import it and you're away!

No comments: