diff --git a/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/ContextMenu/KryptonContextMenuImageSelect.cs b/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/ContextMenu/KryptonContextMenuImageSelect.cs index 9be03de6..23b6db58 100644 --- a/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/ContextMenu/KryptonContextMenuImageSelect.cs +++ b/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/ContextMenu/KryptonContextMenuImageSelect.cs @@ -64,6 +64,14 @@ public class KryptonContextMenuImageSelect : KryptonContextMenuItemBase [Category("Action")] [Description("Occurs when user is tracking over an image.")] public event EventHandler TrackingImage; + + /// + /// Occurs when the value of the SelectedIndex property changes. + /// + [Category("Action")] + [Description("Occurs when an image is clicked.")] + public event EventHandler Click; + #endregion #region Identity @@ -340,6 +348,18 @@ protected virtual void OnTrackingImage(ImageSelectEventArgs e) if (TrackingImage != null) TrackingImage(this, e); } + + /// + /// Raises the Click event. + /// + /// An EventArgs that contains the event data. + internal virtual void OnClick(EventArgs e) + { + if (Click != null) + Click(this, e); + } + + #endregion #region Internal diff --git a/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs b/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs index 4a506452..2cf6f952 100644 --- a/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs +++ b/Source/Krypton Components/ComponentFactory.Krypton.Toolkit/View Draw/ViewDrawMenuImageSelectItem.cs @@ -202,6 +202,9 @@ private void OnItemClick(object sender, MouseEventArgs e) // Set new selection index _imageSelect.SelectedIndex = _imageIndex; + //Fire a click item event : seb the right way ?? after selected index + _imageSelect.OnClick(e); + // Should we automatically try and close the context menu stack if (_imageSelect.AutoClose) {