ComboBoxItemCollection.Remove(Int32) Method
Removes an item with the specified index from the combo box editor’s item collection.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public bool Remove(
int index
)
Parameters
Name | Type | Description |
---|---|---|
index | Int32 | The item index. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
<DxRichEdit CustomizeRibbon=OnCustomizeRibbon/>
@code {
void OnCustomizeRibbon(IRibbon ribbon) {
RibbonTabCollection tabs = ribbon.Tabs;
RemoveItemsFromFontComboBox(tabs);
// ...
}
void RemoveItemsFromFontComboBox(RibbonTabCollection tabs) {
IRibbonTab homeTab = tabs[RichEditRibbonTabNames.Home];
IBarGroup homeFontGroup = homeTab.Groups[RichEditRibbonGroupNames.HomeFont];
IBarItem fontNameItem = homeFontGroup.Items[RichEditBarItemNames.FontName];
if (fontNameItem.Type == BarItemTypes.ComboBox) {
IBarComboBox fontNameComboBox = (IBarComboBox)fontNameItem;
fontNameComboBox.Items.Remove("Arial");
fontNameComboBox.Items.Remove(0);
}
}
}
See Also