IBarGroup Interface
An item group on the Rich Text Editor‘s ribbon or toolbar.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public interface IBarGroup :
IBarItemBase
Related API Members
The following members return IBarGroup objects:
Remarks
The Rich Text Editor can display its command bar in two ways:
Ribbon UI. The ribbon consists of multiple tabs. A tab includes
groups
, and a group can contain various items.Toolbar UI. The toolbar consists of
groups
, and each group contains one or more items.
The IBarGroup
interface defines an item group on a toolbar or ribbon. Use the interface properties to change the group visibility or customize the group appearance.
The following code snippet customizes the first group on the Insert ribbon tab.
<DxRichEdit CustomizeRibbon=OnCustomizeRibbon @bind-Selection=@selection />
@code {
Selection selection;
void OnCustomizeRibbon(IRibbon ribbon) {
IBarGroup firstGroup = ribbon.Tabs[RichEditRibbonTabNames.Insert].Groups[0];
firstGroup.Text = "Insert Fields";
firstGroup.IconUrl = "your-icon-url";
firstGroup.GetVisible = () => selection.ActiveSubDocument.Type != SubDocumentType.TextBox;
firstGroup.Items.Clear();
firstGroup.Items.Add(RichEditBarItemNames.InsertFieldMenu);
}
}