'宣言 Public ReadOnly Property GalleryTool As PopupGalleryTool
public PopupGalleryTool GalleryTool {get;}
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 + "\"" ); }