バージョン

FieldOffsetX プロパティ

X ディメンションで FieldLayout 内の Field 間のオフセット量を取得または設定します。
シンタックス
'宣言
 
Public Property FieldOffsetX As Double
public double FieldOffsetX {get; set;}
例外
例外解説
System.ArgumentOutOfRangeException無限大に設定する場合。
解説

この設定を使用して、各 Field に設定される正しい OffsetProperty を計算します。この Offset は、Field の DataTemplate のルート要素の Margin プロパティにバインドされます。

注: 正の値、負の値、0、または NaN のみ有効です。

使用例
' set GroupByAreaMode to 'MultipleFieldLayoutsCompact' so that all
' fields will be displayed horizontally in a single list
'
' Note: the default value is 'MultipleFieldLayoutsFull' which will
'       display the FieldLayouts hierarchically.
Me.xamDataGrid1.GroupByAreaMode = GroupByAreaMode.MultipleFieldLayoutsCompact

Dim grpByAreaMulti As GroupByAreaMulti = Me.xamDataGrid1.GroupByAreaMulti

' specify the pen used for connecting fields in the GroupByAreaMulti
grpByAreaMulti.ConnectorLinePen = New Pen(Brushes.Red, 2)

' set an optional offset between fields in the GroupByAreaMulti
grpByAreaMulti.FieldOffsetX = 10
grpByAreaMulti.FieldOffsetY = 10

' set an optional offset between fieldlayouts in the GroupByAreaMulti
' (e.g. with hierachical and/or heterogenuous data) 
grpByAreaMulti.FieldLayoutOffsetX = 15
grpByAreaMulti.FieldLayoutOffsetY = 5

' You can optionally set the 2 prompts displayed in the GroupByAreaMulti
grpByAreaMulti.Prompt1 = "*** Groupby Area ***"
grpByAreaMulti.Prompt2 = "Drag a field here to group by that field."

' Specify an optional custom template for the FieldLayout description
' Note": The FieldLayout description is only visible when there
'        are fields from multiple FieldLayouts present.
Dim template As Object = Me.TryFindResource("MyCustomTemplate")

If TypeOf template Is DataTemplate Then
    grpByAreaMulti.FieldLayoutDescriptionTemplate = CType(template, DataTemplate)
End If
// set GroupByAreaMode to 'MultipleFieldLayoutsCompact' so that all
// fields will be displayed horizontally in a single list
//
// Note: the default value is 'MultipleFieldLayoutsFull' which will
//       display the FieldLayouts hierarchically.
this.xamDataGrid1.GroupByAreaMode = GroupByAreaMode.MultipleFieldLayoutsCompact;

GroupByAreaMulti  groupByAreaMulti = this.xamDataGrid1.GroupByAreaMulti;

// specify the pen used for connecting fields in the GroupByAreaMulti
groupByAreaMulti.ConnectorLinePen = new Pen( Brushes.Red, 2);

// set an optional offset between fields in the GroupByAreaMulti
groupByAreaMulti.FieldOffsetX = 10;
groupByAreaMulti.FieldOffsetY = 10;

// set an optional offset between fieldlayouts in the GroupByAreaMulti
// (e.g. with hierachical and/or heterogenuous data) 
groupByAreaMulti.FieldLayoutOffsetX = 15;
groupByAreaMulti.FieldLayoutOffsetY = 5;

// You can optionally set the 2 prompts displayed in the GroupByAreaMulti
groupByAreaMulti.Prompt1 = "*** Groupby Area ***";
groupByAreaMulti.Prompt2 = "Drag a field here to group by that field.";

// Specify an optional custom template for the FieldLayout description
// Note": The FieldLayout description is only visible when there
//        are fields from multiple FieldLayouts present.
groupByAreaMulti.FieldLayoutDescriptionTemplate = this.TryFindResource("MyCustomTemplate") as DataTemplate;

    
<!-- set GroupByAreaMode to 'MultipleFieldLayoutsCompact' so that all
         fields will be displayed horizontally in a single list 
    
         Note: the default value is 'MultipleFieldLayoutsFull' which will
               display the FieldLayouts hierarchically
-->

    
<igDP:XamDataGrid x:Name="xamDataGrid1"
                      
GroupByAreaMode="MultipleFieldLayoutsCompact">
            
<igDP:XamDataGrid.GroupByAreaMulti>

                
<!-- specify various optional settings that affect the layout and content
                     of the GroupByAreaMulti 
-->
                
<igDP:GroupByAreaMulti 
                    
FieldLayoutOffsetX="20" 
                    
FieldLayoutOffsetY="30"
                    
FieldOffsetX="10"
                    
FieldOffsetY="10"
                    
Prompt1="*** Groupby Area ***"
                    
Prompt2="Drag a field here to group by that field.">

                    
<!--  specify the pen used for connecting fields in the GroupByAreaMulti -->
                    
<igDP:GroupByAreaMulti.ConnectorLinePen>
                        
<Pen Brush="Red" Thickness="2"/>
                    
</igDP:GroupByAreaMulti.ConnectorLinePen>

                    
<!--  Specify an optional custom template for the FieldLayout description
                          Note": The FieldLayout description is only visible when there
                                 are fields from multiple FieldLayouts present 
-->
                    
<igDP:GroupByAreaMulti.FieldLayoutDescriptionTemplate>
                        
<DataTemplate>
                            
<Border BorderThickness="2" CornerRadius="6" BorderBrush="DarkGray">
                                
<StackPanel Orientation="Horizontal">
                                    
<Ellipse Fill="DarkGray" VerticalAlignment="Center" Width="13" Height="10" Margin="4"/>
                                    
<TextBlock Text="{Binding Description}" Margin="4,2,4,2"/>
                                    
<Ellipse Fill="DarkGray" VerticalAlignment="Center" Width="13" Height="10" Margin="4"/>
                                
</StackPanel>
                            
</Border>
                        
</DataTemplate>
                    
</igDP:GroupByAreaMulti.FieldLayoutDescriptionTemplate>
                
</igDP:GroupByAreaMulti>
        
</igDP:XamDataGrid.GroupByAreaMulti>
    
</igDP:XamDataGrid>
参照