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

DxRichEdit.BarMode Property

Specifies how the Rich Text Editor displays its command bar.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

#Declaration

C#
[DefaultValue(BarMode.Ribbon)]
[Parameter]
public BarMode BarMode { get; set; }

#Property Value

Type Default Description
BarMode Ribbon

A bar mode.

Available values:

Name Description
Ribbon

The editor displays a ribbon.

Toolbar

The editor displays a toolbar.

None

The editor does not display a command bar.

#Remarks

The Rich Text Editor can display its command bar as a ribbon or toolbar. Use the BarMode property to hide the bar or change its display mode. To respond to bar mode changes, handle the BarModeChanged event.

The following code snippet hides the command bar, loads a document, and activates the read-only mode:

Razor
<DxRichEdit @ref="richEdit" ReadOnly="true" BarMode=BarMode.None/>
@code {
    DxRichEdit richEdit; 

    protected override Task OnAfterRenderAsync(bool firstRender) {
        if (firstRender)
            InitializeDocument();
        return base.OnAfterRenderAsync(firstRender);
    }

    async void InitializeDocument() {
        await richEdit.LoadDocumentAsync("C:\\Users\\Public\\annual-report.docx");
    }
}
See Also