RibbonTabCollection.Add(String) Method
Adds a predefined tab to the specified position in the ribbon.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public IRibbonTab Add(
string name
)
Parameters
Name | Type | Description |
---|---|---|
name | String | The tab name. |
Returns
Type | Description |
---|---|
IRibbonTab | The inserted ribbon tab. |
Remarks
The following code snippet customizes the ribbon as follows:
<DxRichEdit CustomizeRibbon=OnCustomizeRibbon />
@code {
void OnCustomizeRibbon(IRibbon ribbon) {
ribbon.Tabs.Clear();
// Inserts the Home tab at the end of the tab collection
ribbon.Tabs.Add(RichEditRibbonTabNames.Home);
// Inserts the File tab at the first position in the tab collection
ribbon.Tabs.Add(0, RichEditRibbonTabNames.File);
}
}
See Also