Skip to main content
A newer version of this page is available. .

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.v19.1.dll

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>

The following code snippets (auto-collected from DevExpress Examples) contain references to the RibbonActions 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.

See Also