Back to Devexpress

DxRibbonSpinEditItem<TValue>.Value Property

blazor-devexpress-dot-blazor-dot-dxribbonspinedititem-1-9d84876e.md

latest2.3 KB
Original Source

DxRibbonSpinEditItem<TValue>.Value Property

Specifies the spin editor item value.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(null)]
[Parameter]
public TValue Value { get; set; }

Property Value

TypeDefaultDescription
TValuenull

The editor value.

|

Remarks

Use the Value property to specify the editor’s value or to bind the value to a data source object. You can use the @bind attribute to bind the Value property to a data field. Refer to the following topic for details: Two-Way Data Binding.

razor
...
<DxRibbonSpinEditItem Value="@CurrentFontSize"
                      ValueChanged="@((int newSize) => OnFontSizeChanged(newSize))"
                      MinValue="6"
                      MaxValue="32"
                      Increment="2"
                      Width="100px"/>
...
@code {
    private int CurrentFontSize { get; set; } = 8;

    void OnFontSizeChanged(int newSize) {
        // Your code
    }
}

To respond to the value change, handle the ValueChanged event.

The spin editor item supports the following data types:

Implements

DevExpress.Blazor.Ribbon.IRibbonSpinEdit<TValue>.Value

See Also

DxRibbonSpinEditItem<TValue> Class

DxRibbonSpinEditItem<TValue> Members

DevExpress.Blazor Namespace