IRibbonComboBox<TData, TValue> Interface
Defines the programmatic interface for the DxRibbonComboBoxItem<TData, TValue> component.
Namespace: DevExpress.Blazor.Ribbon
Assembly: DevExpress.Blazor.v25.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public interface IRibbonComboBox<TData, TValue> :
IRibbonGroupItem,
IRibbonGroupElement,
IRibbonElement,
IRibbonNode,
IRibbonInteractiveElement
Type Parameters
| Name | Description |
|---|---|
| TData | The type of data. |
| TValue | The type of values. |
Remarks
Use the IRibbonComboBox interface to read and modify DxRibbonComboBoxItem<TData, TValue> component properties at runtime and customize the Ribbon combo box editor’s appearance and behavior.
Obtain an IRibbonComboBox instance with the @ref attribute or from Ribbon event arguments.
The following code snippet gets an IRibbonComboBox reference and specifies the text displayed in the edit box of the Ribbon’s combo box:
<DxRibbon>
<DxRibbonTab Text="Home">
<DxRibbonGroup>
<DxRibbonItem Text="Set Font Size"
Click="SetFontSize" />
<DxRibbonComboBoxItem Data="FontSizes"
@bind-Value="CurrentFontSize"
TextFieldName="@nameof(FontSizeInfo.Size)"
@ref="comboBoxReference" />
</DxRibbonGroup>
</DxRibbonTab>
</DxRibbon>
@code {
IRibbonComboBox<FontSizeInfo, FontSizeInfo> comboBoxReference;
private FontSizeInfo CurrentFontSize { get; set; }
private IEnumerable<FontSizeInfo> FontSizes => FontSizeInfo.DefaultFontSizes;
void SetFontSize(RibbonItemClickEventArgs e) {
comboBoxReference.EditText = "32";
}
}
See Also