Blazor

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfSlider<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfSlider<TValue>

    The Slider component allows the user to select a value or range of values in-between the min and max range, by dragging the handle over the slider bar.

    Inheritance
    System.Object
    Syncfusion.Blazor.SfBaseComponent
    SfSlider<TValue>
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SfSlider<TValue> : SfBaseComponent, ISlider
    Type Parameters
    Name Description
    TValue

    Constructors

    SfSlider()

    Declaration
    public SfSlider()

    Properties

    ColorRange

    Specifies the color to the slider based on given value.

    Declaration
    public List<ColorRangeDataModel> ColorRange { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<ColorRangeDataModel>

    CssClass

    Specifies the custom classes to be added to the element used to customize the slider.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    CustomValues

    Specifies an array of slider values in number or string type. The min and max step values are not considered.

    Declaration
    public string[] CustomValues { get; set; }
    Property Value
    Type Description
    System.String[]

    EnableAnimation

    Enables/Disables the animation for slider movement.

    Declaration
    public bool EnableAnimation { get; set; }
    Property Value
    Type Description
    System.Boolean

    Enabled

    Enables or disables the slider.

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableHtmlSanitizer

    Defines whether to allow the cross-scripting site or not.

    Declaration
    public bool EnableHtmlSanitizer { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnablePersistence

    Enable or disable persisting component's state between page reloads.

    Declaration
    public bool EnablePersistence { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableRtl

    Enable or disable rendering component in right to left direction.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    HtmlAttributes

    Used to specify an additional html attributes such as styles, class, and more to the root element.

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    ID

    Sets id attribute for the slider element.

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    IsImmediateValue

    Specifies whether the value need to be updated at the time of dragging slider handle.

    Declaration
    public bool IsImmediateValue { get; set; }
    Property Value
    Type Description
    System.Boolean

    Limits

    Specified the limit within which the slider to be moved.

    Declaration
    public SliderLimits Limits { get; set; }
    Property Value
    Type Description
    SliderLimits

    Locale

    Overrides the global culture and localization value for this component. Default global culture is 'en-US'.

    Declaration
    public string Locale { get; set; }
    Property Value
    Type Description
    System.String

    Max

    Specifies the maximum value of the slider.

    Declaration
    public double Max { get; set; }
    Property Value
    Type Description
    System.Double

    Min

    Specifies the minimum value of the slider.

    Declaration
    public double Min { get; set; }
    Property Value
    Type Description
    System.Double

    Orientation

    Specifies whether to render the slider in vertical or horizontal orientation.

    Declaration
    public SliderOrientation Orientation { get; set; }
    Property Value
    Type Description
    SliderOrientation

    ReadOnly

    Specifies whether the render the slider in read-only mode to restrict any user interaction. The slider rendered with user defined values and can’t be interacted with user actions.

    Declaration
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowButtons

    Specifies whether to show or hide the increase/decrease buttons of Slider to change the slider value.

    Declaration
    public bool ShowButtons { get; set; }
    Property Value
    Type Description
    System.Boolean

    Slider

    Declaration
    public ElementReference Slider { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.ElementReference

    Step

    Specifies the step value for each value change when the increase / decrease button is clicked or on arrow keys press or on dragging the thumb.

    Declaration
    public double Step { get; set; }
    Property Value
    Type Description
    System.Double

    Ticks

    It is used to render the slider ticks options such as placement and step values.

    Declaration
    public SliderTicks Ticks { get; set; }
    Property Value
    Type Description
    SliderTicks

    Tooltip

    Specifies the visibility, position of the tooltip over the slider element.

    Declaration
    public SliderTooltip Tooltip { get; set; }
    Property Value
    Type Description
    SliderTooltip

    Type

    Defines the type of the Slider. The available options are: Default - Allows to a single value in the Slider. MinRange - Allows to select a single value in the Slider. It display’s a shadow from the start to the current value. Range - Allows to select a range of values in the Slider. It displays shadow in-between the selection range.

    Declaration
    public SliderType Type { get; set; }
    Property Value
    Type Description
    SliderType

    Value

    It is used to denote the current value of the Slider. The value should be specified in array of number when render Slider type as range.

    Declaration
    public TValue Value { get; set; }
    Property Value
    Type Description
    TValue

    ValueChanged

    Gets or sets a callback of the bound value.

    Declaration
    public EventCallback<TValue> ValueChanged { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<TValue>

    Width

    Specifies the width of the Slider.

    Declaration
    public string Width { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    CloseTooltip()

    Declaration
    public Task CloseTooltip()
    Returns
    Type Description
    System.Threading.Tasks.Task

    OnAfterRenderAsync(Boolean)

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(System.Boolean)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    Syncfusion.Blazor.SfBaseComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    Reposition()

    This method is used to reposition slider.

    Declaration
    public Task Reposition()
    Returns
    Type Description
    System.Threading.Tasks.Task

    TriggeredTicksRendered(ElementReference, Dictionary<String, Object>)

    Calling Ticks Rendered Event

    Declaration
    public Task<SliderTickRenderedEventArgs> TriggeredTicksRendered(ElementReference tickscontainerRef, Dictionary<string, object> attributes)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.ElementReference tickscontainerRef
    System.Collections.Generic.Dictionary<System.String, System.Object> attributes
    Returns
    Type Description
    System.Threading.Tasks.Task<SliderTickRenderedEventArgs>

    TriggeredTicksRendering(ElementReference, String, Double, Dictionary<String, Object>)

    Calling Ticks Rendering Event

    Declaration
    public Task<SliderTickEventArgs> TriggeredTicksRendering(ElementReference ticksRef, string text, double sliderValue, Dictionary<string, object> attributes)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.ElementReference ticksRef
    System.String text
    System.Double sliderValue
    System.Collections.Generic.Dictionary<System.String, System.Object> attributes
    Returns
    Type Description
    System.Threading.Tasks.Task<SliderTickEventArgs>
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved