DxRichEdit.BarMode Property
Specifies how the Rich Text Editor displays its command bar.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.1.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
[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.
The following code snippet hides the command bar, loads a document, and activates the read-only mode.
<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