'Declaration Public Event GalleryToolItemClick As GalleryToolItemEventHandler
public event GalleryToolItemEventHandler GalleryToolItemClick
The event handler receives an argument of type GalleryToolItemEventArgs containing data related to this event. The following GalleryToolItemEventArgs properties provide information specific to this event.
Property | Description |
---|---|
GalleryTool | Gets the gallery tool associated with this event |
Group | Gets the group to which the item belongs. This will not apply when the ItemLocation is Preview. |
Item | Gets the item associated with the event |
ItemLocation | Gets the gallery location of the item. |
Imports Infragistics.Win.UltraWinToolbars Private Sub UltraToolbarsManager1_GalleryToolItemClick(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.GalleryToolItemEventArgs) Handles UltraToolbarsManager1.GalleryToolItemClick ' Use the event arguments to construct a message describing the item that was clicked. Dim message As String = e.Item.Title & " has been clicked in the " & e.ItemLocation.ToString() & " area. " ' If the item is selected, include that in the message also. IsSelected will ' be true when the ItemStyle of the gallery owning the item is set to StateButton. ' Otherwise, it will be false. If e.Item.IsSelected Then message = message & "It is now the selected item." End If MessageBox.Show(message) End Sub
using System.Windows.Forms; using Infragistics.Win.UltraWinToolbars; private void ultraToolbarsManager1_GalleryToolItemClick( object sender, GalleryToolItemEventArgs e ) { // Use the event arguments to construct a message describing the item that was clicked. string message = e.Item.Title + " has been clicked in the " + e.ItemLocation.ToString() + " area. "; // If the item is selected, include that in the message also. IsSelected will // be true when the ItemStyle of the gallery owning the item is set to StateButton. // Otherwise, it will be false. if ( e.Item.IsSelected ) message += "It is now the selected item."; MessageBox.Show( message ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2