Back to Devexpress

DxRangeSelector.SnapSliderToTicks Property

blazor-devexpress-dot-blazor-dot-dxrangeselector-7fb18171.md

latest2.1 KB
Original Source

DxRangeSelector.SnapSliderToTicks Property

Specifies whether to dock the dropped slider to the nearest tick.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(true)]
[Parameter]
public bool SnapSliderToTicks { get; set; }

Property Value

TypeDefaultDescription
Booleantrue

true to dock dropped sliders to ticks; otherwise, false.

|

Remarks

When a user drops a slider on the scale, the Range Selector docks it to the nearest tick. Set the SnapSliderToTicks property to false to leave the slider where it was dropped.

razor
<DxRangeSelector Width="1100px"
                 Height="200px"
                 SnapSliderToTicks="false"
                 SelectedRangeStartValue="@(new DateTime(2024, 2, 1))"
                 SelectedRangeEndValue="@(new DateTime(2024, 2, 14))">
    <DxRangeSelectorScale StartValue="@(new DateTime(2024, 1, 1))"
                          EndValue="@(new DateTime(2024, 6, 1))"
                          TickInterval="ChartAxisInterval.Weeks(2)"
                          MinorTickInterval="ChartAxisInterval.Week"
                          MinRange="ChartAxisInterval.Week"
                          MaxRange="ChartAxisInterval.Month"
                          ValueType="ChartAxisDataType.DateTime">
        <DxRangeSelectorScaleMarker>
            <DxRangeSelectorScaleMarkerLabel>
                <DxTextFormatSettings Type="TextFormat.MonthAndYear" />
            </DxRangeSelectorScaleMarkerLabel>
        </DxRangeSelectorScaleMarker>
    </DxRangeSelectorScale>
    <DxRangeSelectorSliderMarker>
        <DxTextFormatSettings Type="TextFormat.MonthAndDay" />
    </DxRangeSelectorSliderMarker>
</DxRangeSelector>

See Also

DxRangeSelector Class

DxRangeSelector Members

DevExpress.Blazor Namespace