'宣言 Public Event GalleryToolFilterChange As GalleryToolFilterChangeEventHandler
public event GalleryToolFilterChangeEventHandler GalleryToolFilterChange
イベント ハンドラが、このイベントに関連するデータを含む、GalleryToolFilterChangeEventArgs 型の引数を受け取りました。次の GalleryToolFilterChangeEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
Filter | 選択されたフィルターを取得します |
GalleryTool | フィルターが変更されたギャラリー ツールを取得します |
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 + "\"" ); }