バージョン

GridView クラス

従来のグリッド レイアウトを使用してデータを配列するビューの設定およびデフォルトを定義する ViewBase 派生クラス。GridView オブジェクトは XamDataGrid および XamDataPresenter により使用されます。
シンタックス
'宣言
 
Public Class GridView 
   Inherits GridViewBase
public class GridView : GridViewBase 
解説

GridView オブジェクトは XamDataGrid および XamDataPresenter で使用し、DataPresenterBase (XamDataGrid コントロールおよび XamDataPresenter コントロールの基本クラス) が参照できる設定およびデフォルトを提供します。これは、View にサポートされ UI 要素生成サービスおよびフィールド レイアウト生成サービスを提供する場合に使用します。GridView オブジェクトは実際は項目を配列しませんが、ビューに表示された DataRecord のレイアウト機能を提供する場合に使用する System.Windows.Controls.Panel 派生タイプを返す ItemsPanelType と呼ばれるプロパティを公開します。DataPresenterBase は、 ItemsPanelType のパネルが埋め込まれた RecordListControl (DataRecord を表示していた System.Windows.Controls.ListBox 派生クラス) によって生成されることを確実にします。

GridView オブジェクトは、GridViewSettings オブジェクトを返す ViewSettings というプロパティを公開します。(注: このプロパティは、ViewBase クラスでは見つかりませんが、GridView に固有なプロパティです)。GridViewSettingsが今度は、GridView でサポートされている機能を制御できるプロパティを公開します。これらのプロパティの詳細は、GridViewSettings オブジェクトの項を参照してください。

注: GridView は、GridView のインスタンスに XamDataPresenter コントロールの XamDataPresenter.View プロパティが設定されている場合、XamDataPresenter コントロールによってのみ使用されます(前述のとおり)。

以下の ViewBase プロパティは、CarouselView によってオーバーライドされます。

プロパティ Description オーバーライドされる値
AutoFitToRecord DataPresenterBase.AutoFitResolved が true の場合に、DataRecordPresenter のセル領域が RecordPresenter 自体、またはルート RecordListControl に基づいて自動サイズ設定されるかどうかを示すブール値を返します。 false
CellPresentation 各行のセルが FieldLayoutTemplateGenerator でレイアウトされるデフォルトの動作を決定する View によって使用される CellPresentation のタイプを返します。 CellPresentation.GridView
DefaultAutoArrangeCells View のために生成されるフィールド レイアウト テンプレートの AutoArrangeCells のデフォルト値を返します。 LogicalOrientation が Vertical の場合は AutoArrangeCells.LeftToRight、そうでなければ AutoArrangeCells.LeftToRight
HasLogicalOrientation この View が特定のサイズで子孫を整列するかどうかを示す値を返します。 True
IsAutoFitHeightSupported 各行のセルの高さが調節される場合は True を返します。そうすると、すべてのセルは行で使用できる垂直方向の領域内に収まります。 ViewSettings.Orientation が System.Windows.Controls.Orientation.Horizontal の場合 true。それ以外の場合は、false。
IsAutoFitWidthSupported 各行のセルの幅が調節される場合は True を返します。そうすると、すべてのセルは行で使用できる水平方向の領域内に収まります。 ViewSettings.Orientation が System.Windows.Controls.Orientation.Vertical の場合 true。それ以外の場合は、false。
IsFixedRecordsSupported DataPresenterBase によりレコードを UI の上または下に固定できる必要がある場合は true を返します。 True
ItemsPanelType リストで項目をレイアウトするために View で使用される System.Windows.Controls.Panel のタイプを返します。 (GridViewPanel) のタイプ
LogicalOrientation ビューが特定のディメンションのレイアウトのみサポートする場合、View の System.Windows.Controls.Orientation ViewSettings.Orientation
SupportedDataDisplayMode View でサポートされている DataDisplayMode を示す値を返します。 DataDisplayMode.Hierarchical

使用例

    
<!-- Setting UseNestedPanels to true on a XamDataGrid will
         cause nested content to become active. This will enable
         any chrome, animations and triggers relating to
         RecordPresenters' nested content.
-->
    
<igDP:XamDataGrid x:Name="xamDataGrid1">
        
<igDP:XamDataGrid.ViewSettings>
            
<igDP:GridViewSettings UseNestedPanels="True" Orientation="Vertical"/>
        
</igDP:XamDataGrid.ViewSettings>
    
</igDP:XamDataGrid>

    
<!-- Here is how you would set UseNestedPanels properties
         on a XamDataPresenter.
         Note: the default value for UseNestedPanels is false and
               the default value for Orientation is Vertical.
-->
    
<igDP:XamDataPresenter x:Name="xamDataPresenter1">
        
<igDP:XamDataPresenter.View>
            
<igDP:GridView>
                
<igDP:GridView.ViewSettings>
                    
<igDP:GridViewSettings UseNestedPanels="True" Orientation="Vertical"/>
                
</igDP:GridView.ViewSettings>
            
</igDP:GridView>
        
</igDP:XamDataPresenter.View>
    
</igDP:XamDataPresenter>

' Setting UseNestedPanels to true on a XamDataGrid will
' cause nested content to become active. This will enable
' any chrome, animations and triggers relating to
' RecordPresenters' nested content.
Me.xamDataGrid1.ViewSettings.UseNestedPanels = True
Me.xamDataGrid1.ViewSettings.Orientation = Orientation.Vertical

' Here is how you would set ViewSettings properties
' on a XamDataPresenter.
' Note: the default value for UseNestedPanels is false and
'       the default value for Orientation is Vertical.
Dim gv As New Infragistics.Windows.DataPresenter.GridView
gv.ViewSettings.UseNestedPanels = True
gv.ViewSettings.Orientation = Orientation.Vertical
Me.xamDataPresenter1.View = gv
// Setting UseNestedPanels to true on a XamDataGrid will
     // cause nested content to become active. This will enable
     // any chrome, animations and triggers relating to
     // RecordPresenters' nested content.
     this.xamDataGrid1.ViewSettings.UseNestedPanels = true;
     this.xamDataGrid1.ViewSettings.Orientation = Orientation.Vertical;

     // Here is how you would set ViewSettings properties
     // on a XamDataPresenter.
     // Note: the default value for UseNestedPanels is false and
     //       the default value for Orientation is Vertical.
     Infragistics.Windows.DataPresenter.GridView gv 
         = new Infragistics.Windows.DataPresenter.GridView();
     gv.ViewSettings.UseNestedPanels = true;
     gv.ViewSettings.Orientation = Orientation.Vertical;
     this.xamDataPresenter1.View = gv;
参照