Skip to main content
All docs
V26.1
  • GridViewBase.GroupRowCollapseGlyphTemplate Property

    Gets or sets the template used to display the collapse glyph in group rows. This is a dependency property.

    Namespace: DevExpress.Xpf.Grid

    Assembly: DevExpress.Xpf.Grid.v26.1.dll

    Declaration

    public DataTemplate GroupRowCollapseGlyphTemplate { get; set; }

    Property Value

    Type Description
    DataTemplate

    A DataTemplate that displays the collapse glyph in group rows.

    Remarks

    Assign a DataTemplate to the GroupRowCollapseGlyphTemplate property to replace the icon displayed when a group row is in an expanded state. To replace the predefined glyph, use the GroupRowExpandGlyphTemplate property.

    Supported Themes

    The GroupRowCollapseGlyphTemplate property supports the following themes:

    Example: Replace Group Row Expand and Collapse Glyphs

    The following example assigns arrow icons as expand and collapse glyphs for group rows:

    Group Row - Expand and Collapse Glyphs

    <dx:ThemedWindow xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                     xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
        <dx:ThemedWindow.Resources>
            <DataTemplate x:Key="GroupExpandTemplate">
                <Path Data="M 0,0 L 8,4 L 0,8 Z"
                      Fill="{Binding Path=(TextBlock.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                      HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </DataTemplate>
            <DataTemplate x:Key="GroupCollapseTemplate">
                <Path Data="M 0,0 L 8,0 L 4,8 Z"
                      Fill="{Binding Path=(TextBlock.Foreground), RelativeSource={RelativeSource AncestorType=ContentPresenter}}"
                      HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </DataTemplate>
        </dx:ThemedWindow.Resources>
    
        <dxg:GridControl ItemsSource="{Binding Orders}">
            <dxg:GridControl.View>
                <dxg:TableView GroupRowExpandGlyphTemplate="{StaticResource GroupExpandTemplate}"
                               GroupRowCollapseGlyphTemplate="{StaticResource GroupCollapseTemplate}"/>
            </dxg:GridControl.View>
        </dxg:GridControl>
    </dx:ThemedWindow>
    
    See Also