Version

Groups Property

Returns a modifiable collection of OutlookBarGroup items.
Syntax
'Declaration
 
Public ReadOnly Property Groups As OutlookBarGroupCollection
public OutlookBarGroupCollection Groups {get;}
Remarks

The developer can use only one of Groups or GroupsSource properties to add groups to the control. Each OutlookBarGroup in the Groups belongs to one of readonly collectons: Infragistics.Windows.OutlookBar.XamOutlookBar.NavigationAreaGroupsP:Infragistics.Windows.OutlookBar.XamOutlookBar.ContextMenuGroups

Example
Represents ContextMenuGroups, NavigationAreaGroups and OverflowAreaGroups

XamOutlookBarGroups
void xamOutlookBar1_SelectedGroupChanged(object sender, RoutedEventArgs e)
{
    ShowGroupsLocation(xamOutlookBar1.OverflowAreaGroups);
    ShowGroupsLocation(xamOutlookBar1.NavigationAreaGroups);
    ShowGroupsLocation(xamOutlookBar1.ContextMenuGroups);
    
}

void ShowGroupsLocation(ReadOnlyOutlookBarGroupCollection groups)
{
    foreach (OutlookBarGroup gr in groups)
    {
        int i= xamOutlookBar1.Groups.IndexOf(gr);
        OutlookBarGroup group= xamOutlookBar1.Groups[i];
        Console.WriteLine (gr.Header + " - " +gr.Location);
    }
}
XamOutlookBarGroups
Private  Sub xamOutlookBar1_SelectedGroupChanged(ByVal sender As Object, ByVal e As RoutedEventArgs)
    ShowGroupsLocation(xamOutlookBar1.OverflowAreaGroups)
    ShowGroupsLocation(xamOutlookBar1.NavigationAreaGroups)
    ShowGroupsLocation(xamOutlookBar1.ContextMenuGroups)
 
End Sub
 
Private  Sub ShowGroupsLocation(ByVal groups As ReadOnlyOutlookBarGroupCollection)
    Dim gr As OutlookBarGroup
    For Each gr In groups
        Dim i As Integer =  xamOutlookBar1.Groups.IndexOf(gr) 
        Dim group As OutlookBarGroup =  xamOutlookBar1.Groups(i) 
        Console.WriteLine (gr.Header + " - " +gr.Location)
    Next
End Sub
<Window x:Class="xobsnippets.Window1"
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        
xmlns:igOutlookBar="http://infragistics.com/OutlookBar"
    
Title="Window2" Height="300" Width="300">
    
<Grid>
        
<igOutlookBar:XamOutlookBar Name="xamOutlookBar1" SelectedGroupChanged="xamOutlookBar1_SelectedGroupChanged">
            
<igOutlookBar:OutlookBarGroup Header="Group 1" Content="Group 1"/>
            
<igOutlookBar:OutlookBarGroup Header="Group 2" Content="Group 2"/>
        
</igOutlookBar:XamOutlookBar>
    
</Grid>
</Window>
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