Skip to main content
All docs
V25.1
  • DxRangeSelector.SnapSliderToTicks Property

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

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Property Value

    Type Default Description
    Boolean true

    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.

    <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