In order to support the drop down menu needed for a ribbon gallery I have added a new item type for the KryptonContextMenu. The KryptonContextMenuImageSelect is used to display a range of images that the user can select from. Here you have two instances with a horizontal separator between them…

You provide an ImageList along with the starting and ending indexes of items of interest from the list. This allows you to use the same ImageList instance with multiple KryptonContextMenuImageSelect items but just change the index range between as appropriate.

Use the SelectedIndex property to define the index of the item that should appear selected. When the user selects an item the SelectedIndex is updated and the SelectedIndexChanged event fired. There is also an event that called TrackingItem that is fired as the tracking item changes. So you can provide instance feedback in order parts of your application if that is appropriate.

2 Responses to “Image Selection”

  1. DavidS Says:

    I once asked for this, so imagine my excitement when I opened your blog to see that you had done it, and its not even Christmas

  2. Lewis Says:

    Can you have an alternative to the ImageList? The bug with alpha transparency drives me nuts.

Leave a Reply