Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditControl.RibbonActions Property

Provides access to the collection of actions when using an integrated Ribbon Command UI.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v24.2.dll

NuGet Package: DevExpress.Wpf.RichEdit

#Declaration

public ObservableCollection<IControllerAction> RibbonActions { get; }

#Property Value

Type Description
ObservableCollection<IControllerAction>

A collection of actions that manipulate the ribbon.

#Remarks

The RibbonActions property obtains the collection of bar customization actions used to add, modify or remove ribbon elements.

The action’s ElementName property specifies the name of the existing ribbon element you wish to change or remove. Element names are fields of the DevExpress.Xpf.RichEdit.DefaultBarItemNames class. Refer to the Lesson 6 - Customize the Integrated Ribbon UI topic for more information on how to deduce the element name.

#Example

<dxre:RichEditControl  Name="richEditControl1" CommandBarStyle="Ribbon" DocumentSource="{DXBinding '$local:SourceHelper.GetDocumentSource()'}">
    <dxre:RichEditControl.RibbonActions>
        <dxb:RemoveAction ElementName="{x:Static dxre:DefaultBarItemNames.RibbonPage_Review}"/>
        <dxb:RemoveAction ElementName="{x:Static dxre:DefaultBarItemNames.RibbonGroup_PageLayout_PageBackground}"/>
        <dxb:RemoveAction ElementName="{x:Static dxre:DefaultBarItemNames.RibbonItem_File_Info_DocumentProperties}"/>
        <dxb:RemoveAction ElementName="{x:Static dxre:DefaultBarItemNames.RibbonPage_Review}"/>
        <dxb:RemoveAction ElementName="{x:Static dxre:DefaultBarItemNames.RibbonPage_MailMerge}"/>
        <dxb:UpdateAction ElementName="{x:Static dxre:DefaultBarItemNames.RibbonPage_View}" PropertyName="IsSelected"  Value="True"/>
        <dxb:InsertAction Index="2" ContainerName="{x:Static dxre:DefaultBarItemNames.RibbonPage_View}">
            <dxr:RibbonPageGroup Caption="Demo">
                <dxb:BarButtonItem Content="About"
                                   LargeGlyph="{dx:DXImageOffice2013 Image=Info_32x32.png}"
                                   ItemClick="About_ItemClick"/>
            </dxr:RibbonPageGroup>
        </dxb:InsertAction>
        <dxb:InsertAction Index="7" ContainerName="{x:Static dxre:DefaultBarItemNames.RibbonPage_Insert}">
            <dxr:RibbonPageGroup Caption="Comments">
                <dxb:BarButtonItem Content="Comment"
                                   LargeGlyph="{dx:DXImage Image=NewComment_32x32.png}"
                                   Command="{Binding RelativeSource={RelativeSource Self}, Path=(dxre:RichEditControl.RichEdit).CommandProvider.NewComment}"/>
            </dxr:RibbonPageGroup>
        </dxb:InsertAction>
    </dxre:RichEditControl.RibbonActions>
</dxre:RichEditControl>
See Also