IToolbar Interface
The built-in toolbar for the Rich Text Editor and HTML Editor.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v26.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public interface IToolbar
Remarks
The IToolbar interface defines the toolbar. Use this interface in the following events:
Note
To display the Rich Text Editor‘s command bar as a toolbar, set the BarMode property to BarMode.Toolbar.
The interface’s Groups property allows you to access the toolbar’s group collection. You can obtain an individual group by its name or index.
Rich Text Editor Toolbar
<DxRichEdit BarMode=BarMode.Toolbar CustomizeToolbar=OnCustomizeToolbar />
@code {
void OnCustomizeToolbar(IToolbar toolbar) {
// Accesses the first group
IBarGroup firstGroup = toolbar.Groups[0];
// Accesses the Table group
IBarGroup tableGroup = toolbar.Groups[RichEditToolbarGroupNames.Table];
}
}
HTML Editor Toolbar
@using DevExpress.Blazor.Office
<DxHtmlEditor Height="200px"
CustomizeToolbar="@OnCustomizeToolbar" />
@code {
void OnCustomizeToolbar(IToolbar toolbar) {
// Returns the first group
IBarGroup firstGroup = toolbar.Groups[0];
// Returns the "Table" group
IBarGroup tableGroup = toolbar.Groups[HtmlEditorToolbarGroupNames.Table];
}
}
See Also