バージョン

FieldChooserOpening イベント

データ プレゼンターが FieldChooser を表示する前に発生されます。
シンタックス
'宣言
 
Public Event FieldChooserOpening As EventHandler(Of FieldChooserOpeningEventArgs)
public event EventHandler<FieldChooserOpeningEventArgs> FieldChooserOpening
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、FieldChooserOpeningEventArgs 型の引数を受け取りました。次の FieldChooserOpeningEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
Cancel Infragistics.Windows.Controls.Events.CancelableRoutedEventArgsから継承されます。 
FieldChooser データ プレゼンターが表示しようとしている FieldChooser
Handled System.Windows.RoutedEventArgsから継承されます。Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
OriginalSource System.Windows.RoutedEventArgsから継承されます。Gets the original reporting source as determined by pure hit testing, before any possible System.Windows.RoutedEventArgs.Source adjustment by a parent class.
RoutedEvent System.Windows.RoutedEventArgsから継承されます。Gets or sets the System.Windows.RoutedEventArgs.RoutedEvent associated with this System.Windows.RoutedEventArgs instance.
Source System.Windows.RoutedEventArgsから継承されます。Gets or sets a reference to the object that raised the event.
ToolWindow FieldChooser を表示するために使用する ToolWindow を取得します。
使用例
Imports Infragistics.Windows
Imports Infragistics.Windows.Controls
Imports Infragistics.Windows.Editors
Imports Infragistics.Windows.DataPresenter
Imports Infragistics.Windows.DataPresenter.Events

    Private Sub Dp_FieldChooserOpening(ByVal sender As Object, ByVal e As FieldChooserOpeningEventArgs)
        Dim fieldChooser As FieldChooser = e.FieldChooser

        ' If the data presenter is bound to a hierarchical data source, a combo editor
        ' is displayed in the field chooser that lets the user select the field-layout
        ' whose fields to be display in the field chooser. You can hide this combo
        ' by setting the FieldGroupSelectorVisibility property.
        fieldChooser.FieldGroupSelectorVisibility = Visibility.Collapsed

        ' By defaults all fields are displayed in the field chooser. If you only want 
        ' to display hidden fields in the field chooser, set DisplayHiddenFieldsOnly
        ' to true, which will as a result also remove the checkboxes next to items.
        fieldChooser.DisplayHiddenFieldsOnly = False

        ' By defaults fields are displayed in alphabetical order. You can also display
        ' the fields in the same order as they appear in the data presenter by setting
        ' the FieldDisplayOrder property to SameAsDataPresenter.
        fieldChooser.FieldDisplayOrder = FieldChooserDisplayOrder.Alphabetical
    End Sub
using Infragistics.Windows;
using Infragistics.Windows.Controls;
using Infragistics.Windows.Editors;
using Infragistics.Windows.DataPresenter;
using Infragistics.Windows.DataPresenter.Events;

		private void dp_FieldChooserOpening( object sender, FieldChooserOpeningEventArgs e )
		{
			FieldChooser fieldChooser = e.FieldChooser;

			// If the data presenter is bound to a hierarchical data source, a combo editor
			// is displayed in the field chooser that lets the user select the field-layout
			// whose fields to be display in the field chooser. You can hide this combo
			// by setting the FieldGroupSelectorVisibility property.
			fieldChooser.FieldGroupSelectorVisibility = Visibility.Collapsed;

			// By defaults all fields are displayed in the field chooser. If you only want 
			// to display hidden fields in the field chooser, set DisplayHiddenFieldsOnly
			// to true, which will as a result also remove the checkboxes next to items.
			fieldChooser.DisplayHiddenFieldsOnly = false;

			// By defaults fields are displayed in alphabetical order. You can also display
			// the fields in the same order as they appear in the data presenter by setting
			// the FieldDisplayOrder property to SameAsDataPresenter.
			fieldChooser.FieldDisplayOrder = FieldChooserDisplayOrder.Alphabetical;
		}
This XAML snippet sets the HeaderPrefixAreaDisplayMode property to enable field chooser button and hooks into the FieldChooserOpening event.
<igDP:XamDataGrid x:Name="_dp" FieldChooserOpening="dp_FieldChooserOpening" >
            
<igDP:XamDataGrid.FieldLayoutSettings>
                
<igDP:FieldLayoutSettings HeaderPrefixAreaDisplayMode="FieldChooserButton" />
            
</igDP:XamDataGrid.FieldLayoutSettings>
</igDP:XamDataGrid>
参照