Back to Devexpress

IRibbonSpinEdit<TValue> Interface

blazor-devexpress-dot-blazor-dot-ribbon-dot-iribbonspinedit-1.md

latest1.9 KB
Original Source

IRibbonSpinEdit<TValue> Interface

Defines the programmatic interface for the DxRibbonSpinEditItem<TValue> component.

Namespace : DevExpress.Blazor.Ribbon

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public interface IRibbonSpinEdit<TValue> :
    IRibbonGroupItem,
    IRibbonGroupElement,
    IRibbonElement,
    IRibbonNode,
    IRibbonInteractiveElement

Type Parameters

NameDescription
TValue

The data type.

|

Remarks

Use the IRibbonSpinEdit interface to read and modify DxRibbonSpinEditItem<TValue> component properties at runtime and customize the Ribbon spin editor appearance and behavior.

Obtain an IRibbonSpinEdit instance with the @ref attribute or from Ribbon event arguments.

The following code snippet gets an IRibbonSpinEdit reference and increments the value of the corresponding spin editor:

razor
<DxRibbon>
    <DxRibbonTab Text="Home">
        <DxRibbonGroup>
            <DxRibbonItem Text="Increment"
                          Click="IncrementSpinItem" />
            <DxRibbonSpinEditItem Value="@CurrentFontSize"
                                  Increment="1"
                                  @ref="itemRef" />
        </DxRibbonGroup>
    </DxRibbonTab>
</DxRibbon>

@code {
    private int CurrentFontSize { get; set; } = 8;
    IRibbonSpinEdit<int> itemRef;

    void IncrementSpinItem(RibbonItemClickEventArgs e) {
        itemRef.Value += 1;
    }
}

See Also

IRibbonSpinEdit<TValue> Members

DevExpress.Blazor.Ribbon Namespace