wpf-devexpress-dot-xpf-dot-bars-dot-barcheckitem-e023b875.md
Gets or sets the item’s group index.
Namespace : DevExpress.Xpf.Bars
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
[DefaultValue(-1)]
public int GroupIndex { get; set; }
<DefaultValue(-1)>
Public Property GroupIndex As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | -1 |
The item’s group index.
|
Use the GroupIndex property to combine check items into groups.
When a check item’s GroupIndex property is set to -1, it behaves independently of all the other bar items. If several items have the GroupIndex property set to the same non-negative value, they are grouped together. When a user clicks one of these items, it remains selected until another item belonging to the same group is clicked.
The following code snippets (auto-collected from DevExpress Examples) contain references to the GroupIndex property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-docklayoutmanager-merge-ribbon-controls/CS/WpfApplication1/MainWindow.xaml#L32
<dxr:RibbonStatusBarControl.RightItems>
<dxb:BarCheckItem x:Name="biLeft" Glyph="{dx:DXImage Image=AlignLeft_16x16.png}" GroupIndex="1" IsChecked="True" MergeType="MergeItems"/>
<dxb:BarCheckItem x:Name="biCenter" Glyph="{dx:DXImage Image=AlignCenter_16x16.png}" GroupIndex="1" MergeType="MergeItems"/>
mvvm-application-with-wpf-bars/CS/Bars_in_MVVM_Application/MainWindow.xaml#L51
IsEnabled="{DXBinding 'SelectedIssue != null'}">
<dxb:BarCheckItem Content="Low" GroupIndex="0" Background="Green" Foreground="White"
Command="{DXCommand Execute='SelectedIssue.Priority = $local:Priority.Low'}"
See Also