Version

GalleryToolFilterChange Event (UltraToolbarsManager)

Occurs when the selected group filter of a gallery tool has changed.
Syntax
'Declaration
 
Public Event GalleryToolFilterChange As GalleryToolFilterChangeEventHandler
public event GalleryToolFilterChangeEventHandler GalleryToolFilterChange
Event Data

The event handler receives an argument of type GalleryToolFilterChangeEventArgs containing data related to this event. The following GalleryToolFilterChangeEventArgs properties provide information specific to this event.

PropertyDescription
Filter Gets the filter which was selected
GalleryTool Gets the gallery tool in which the filter was changed
Example
This sample demonstrates how to handle the GalleryToolFilterChange event.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Win.UltraWinToolbars

Private Sub UltraToolbarsManager1_GalleryToolFilterChange(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.GalleryToolFilterChangeEventArgs) Handles UltraToolbarsManager1.GalleryToolFilterChange
	Dim filterText As String = ""

	' Determine what the text for the newly selected filter is by 
	' accessing the Filter property of the event arguments
	If Not (e.Filter Is Nothing) Then
		filterText = e.Filter.Text
	End If

	' Get the key of the gallery whose filter has changed by accessing 
	' the GalleryTool property of the event arguments
	Dim galleryKey As String = e.GalleryTool.Key

	' Display the information about the new filter to the user
	MessageBox.Show("The new filter selected for the " + galleryKey + " gallery is """ + filterText + """")
End Sub
using System.Windows.Forms;
using Infragistics.Win.UltraWinToolbars;

private void ultraToolbarsManager1_GalleryToolFilterChange( object sender, GalleryToolFilterChangeEventArgs e )
{
	string filterText = "";

	// Determine what the text for the newly selected filter is by 
	// accessing the Filter property of the event arguments
	if ( e.Filter != null )
		filterText = e.Filter.Text;

	// Get the key of the gallery whose filter has changed by accessing 
	// the GalleryTool property of the event arguments
	string galleryKey = e.GalleryTool.Key;

	// Display the information about the new filter to the user
	MessageBox.Show( "The new filter selected for the " + galleryKey + " gallery is \"" + filterText + "\"" );
}
Requirements

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

See Also