Skip to main content
A newer version of this page is available. .
All docs
V21.2

RibbonPage.GroupCollectionTemplate Property

Gets or sets the RibbonPage.Group collection in RibbonPage that RibbonControl should load only when a user opens the page. This is a dependency property.

Namespace: DevExpress.Xpf.Ribbon

Assembly: DevExpress.Xpf.Ribbon.v21.2.dll

NuGet Package: DevExpress.Wpf.Ribbon

Declaration

public DataTemplate GroupCollectionTemplate { get; set; }

Property Value

Type Description
DataTemplate

A template.

Remarks

This technique works the best when your RibbonControl contains multiple RibbonPages with many items, galleries, or other heavy-weight content.

To enable deferred RibbonPage item loading, move a RibbonPage’s RibbonPageGroups to the GroupCollectionTemplate.

The code sample below populates the RibbonPage‘s GroupCollectionTemplate with items.

<dx:ThemedWindow ...
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
    xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon">
    <dxr:RibbonControl RibbonStyle="Office2019">
        <dxr:RibbonDefaultPageCategory>
            <dxr:RibbonPage Caption="File">
                <!-- ... -->
            </dxr:RibbonPage>
            <dxr:RibbonPage Caption="Home">
                <dxr:RibbonPage.GroupCollectionTemplate>
                    <DataTemplate>
                        <ItemsControl>
                            <dxr:RibbonPageGroup Caption="File">
                                <dxb:BarButtonItem ... />
                                <dxb:BarButtonItem ... />
                                <dxb:BarButtonItem ... />
                                <dxb:BarButtonItem ... />
                                <dxb:BarItemLinkSeparator />
                                <dxb:BarSplitButtonItem ... />
                            </dxr:RibbonPageGroup>
                            <dxr:RibbonPageGroup Caption="Edit">
                                <!-- ... -->
                            </dxr:RibbonPageGroup>
                            <dxr:RibbonPageGroup Caption="Format">
                                <!-- ... -->
                            </dxr:RibbonPageGroup>
                        </ItemsControl>
                    </DataTemplate>
                </dxr:RibbonPage.GroupCollectionTemplate>
            </dxr:RibbonPage>
            <dxr:RibbonPage Caption="Gallery Page">
                <dxr:RibbonPage.GroupCollectionTemplate>
                    <DataTemplate>
                        <ItemsControl>
                            <dxr:RibbonPageGroup Caption="Font">
                                <dxr:RibbonGalleryBarItem Content="Font">
                                    <!-- ... -->
                                </dxr:RibbonGalleryBarItem>
                                <dxb:BarEditItem ... >
                            </dxr:RibbonPageGroup>
                        </ItemsControl>
                    </DataTemplate>
                </dxr:RibbonPage.GroupCollectionTemplate>
            </dxr:RibbonPage>
        </dxr:RibbonDefaultPageCategory>
    </dxr:RibbonControl>
</dx:ThemedWindow>
See Also