Back to Devexpress

RichEditControl.CommandBarStyle Property

wpf-devexpress-dot-xpf-dot-richedit-dot-richeditcontrol-8a6547b1.md

latest5.2 KB
Original Source

RichEditControl.CommandBarStyle Property

Gets or sets the command bar for the RichEditControl. This is a dependency property.

Namespace : DevExpress.Xpf.RichEdit

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

NuGet Package : DevExpress.Wpf.RichEdit

Declaration

csharp
public CommandBarStyle CommandBarStyle { get; set; }
vb
Public Property CommandBarStyle As CommandBarStyle

Property Value

TypeDescription
CommandBarStyle

A CommandBarStyle enumeration value specifying the type of the command bar.

|

Available values:

NameDescription
Empty

The RichEditControl has no Ribbon UI.

| | Ribbon |

The RichEditControl has Ribbon UI.

|

Remarks

Use the CommandBarStyle property to provide the RichEditControl with a built-in ribbon menu. To do that, set the property to CommandBarStyle.Ribbon, as illustrated in the Create a Simple Rich Text Editor document.

To see how to provide the RichEditControl with a bar menu, refer to the Create Separate Command UI for a Rich Text Editor topic.

Note

The RichEditControl.Ribbon property does not return the ribbon menu specified by the CommandBarStyle property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CommandBarStyle 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-rich-text-editor-customize-context-menu/CS/ContextMenuCustomization/MainWindow.xaml#L38

xml
<dxre:RichEditControl x:Name="richEdit" CommandBarStyle="Empty" BarManager="{Binding ElementName=barManager1, Mode=OneTime}" PopupMenuShowing="RichEditPopupMenuShowing">
    <dxre:RichEditControl.MenuCustomizations>

wpf-richedit-replace-standard-command-with-custom-command/CS/DXApplication36/MainWindow.xaml#L14

xml
Title="DXApplication" Height="700" Width="1100">
    <dxre:RichEditControl x:Name="richEditControl1" CommandBarStyle="Ribbon"/>
</dx:ThemedWindow>

wpf-richedit-link-hyphenation-dictionaries/CS/DXRichEdit/MainWindow.xaml#L18

xml
Width="430">
    <dxre:RichEditControl x:Name="richEditControl1" CommandBarStyle="Ribbon"/>
</dx:ThemedWindow>

wpf-richedit-manage-tracked-changes/CS/DXRichEdit_TrackChanges/MainWindow.xaml#L10

xml
<Grid>
    <dxre:RichEditControl x:Name="richEditControl1" CommandBarStyle="Ribbon" TrackedMovesConflict="RichEditControl_TrackedMovesConflict">
        <dxre:RichEditControl.AnnotationOptions>

wpf-richedit-document-encryption/CS/DXRichEdit_Encryption/MainWindow.xaml#L39

xml
<dxre:RichEditControl x:Name="richEditControl1"
                      CommandBarStyle="Empty"
                      DocumentSource="{Binding Path=RichEditDocumentSource}"

See Also

How to: Create Separate Command UI for the Rich Text Editor

Customize the Integrated Ribbon UI

RichEditControl Class

RichEditControl Members

DevExpress.Xpf.RichEdit Namespace