BarItemCollectionBase<T>.Clear() Method
In This Article
Removes all tabs, groups, or items from a tab, group, or item collection.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
#Declaration
C#
public void Clear()
#Remarks
The following code snippet removes all groups from the ribbon’s Home tab.
Razor
<DxRichEdit CustomizeRibbon=OnCustomizeRibbon />
@code {
void OnCustomizeRibbon(IRibbon ribbon) {
IRibbonTab homeTab = ribbon.Tabs[RichEditRibbonTabNames.Home];
// Removes all groups
homeTab.Groups.Clear();
}
}
The following code snippet removes all items from the Common group on the toolbar.
Razor
<DxRichEdit BarMode=BarMode.Toolbar CustomizeToolbar=OnCustomizeToolbar />
@code {
void OnCustomizeToolbar(IToolbar toolbar) {
IBarGroup fileCommonGroup = toolbar.Groups.Add(RichEditRibbonGroupNames.FileCommon);
// Removes all items
fileCommonGroup.Items.Clear();
}
}
See Also