Version

GroupByAreaMulti Property (DataPresenterBase)

Returns/sets the GroupByAreaMulti control that is used for Outlook style grouping across multiple FieldLayouts.
Syntax
'Declaration
 
Public Property GroupByAreaMulti As GroupByAreaMulti
public GroupByAreaMulti GroupByAreaMulti {get; set;}
Remarks

The GroupByAreaMode property determines whether the XamDataPresenter uses the original GroupByArea control as the UI for Outlook style grouping of the DefaultFieldLayout only or whether it uses the GroupByAreaMulti control for Outlook style grouping across multiple FieldLayouts.

Example
The following code sets the Group ByAreaMode property to 'MultipleFieldLayoutsCompact' so that any grouped fields will be displayed horizontally inside the GroupByAreaMulti in a single list. It also demonstrates how to specifiy various options to control the layout and and content of the GroupByAreaMutli.

' 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>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also