Class SfSlider<TValue>
Partial class SfSlider.
Inherited Members
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public class SfSlider<TValue> : SfBaseComponent, ISlider
Type Parameters
Name | Description |
---|---|
TValue | Generic type parameter. |
Constructors
SfSlider()
Declaration
public SfSlider()
Properties
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 | Accepts the CSS class string separated by space to customize the appearance of component. The default value is empty. |
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[] | Accepts an array of slider values in number or string type. |
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 |
|
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 |
|
ID
Sets id attribute for the slider element.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
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 |
|
Max
Specifies the maximum value of the slider.
Declaration
public double Max { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts a double value representing that the maximum value of slider. The default value is |
Min
Specifies the minimum value of the slider.
Declaration
public double Min { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts a double value representing that the minimum value of slider. The default value is |
Orientation
Specifies whether to render the slider in vertical or horizontal orientation.
Declaration
public SliderOrientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
SliderOrientation | A value of the SliderOrientation enumeration that specifies the orientation of scale. The default value is Horizontal. |
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
Get and set the Slider.
Declaration
public ElementReference Slider { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.ElementReference |
SliderEditContext
Specifies the ChildContent.
Declaration
protected EditContext SliderEditContext { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.Forms.EditContext |
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 | Accepts the double value that specifies the step value change when increase or decrease button is clicked or arrow key press or dragging the thumb. The default value is |
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 | The options for rendering the slider ticks, such as placement and step values. |
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 | One of the SliderType enumeration that specifies the type of slider in the component. |
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 | The current value of the Slider. |
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> | An event callback function. |
Width
Specifies the width of the Slider.
Declaration
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
CloseTooltip()
Closes the Tooltip Element.
Declaration
public Task CloseTooltip()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | ="Task". |
GetDataId()
Get Slider data id.
Declaration
public string GetDataId()
Returns
Type |
---|
System.String |
OnAfterRenderAsync(Boolean)
Method invoked after each time the component has been rendered.
Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender | Set to true for the first time component rendering; otherwise gets false. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | "Task". |
Overrides
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | "Task". |
Overrides
OnOpen(TooltipEventArgs)
update tooltip position.
Declaration
public Task OnOpen(TooltipEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
TooltipEventArgs | args | args. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | ="Task". |
OnParametersSetAsync()
Method invoked when any changes in component state occurs.
Declaration
protected override Task OnParametersSetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | "Task". |
RepositionAsync()
This method is used to reposition slider.
Declaration
public Task RepositionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | "Task". |
TriggeredTicksRendered(ElementReference, Dictionary<String, Object>)
Calling Ticks Rendered Event.
Declaration
public Task<SliderTickRenderedEventArgs> TriggeredTicksRendered(ElementReference ticksWrapperRef, Dictionary<string, object> attributes)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.ElementReference | ticksWrapperRef | args. |
System.Collections.Generic.Dictionary<System.String, System.Object> | attributes | attributes. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SliderTickRenderedEventArgs> | ="Task". |
TriggeredTicksRendering(ElementReference, String, Double, Dictionary<String, Object>)
Calling Ticks Rendering Event.
Declaration
public Task<SliderTickEventArgs> TriggeredTicksRendering(ElementReference ticksRef, string text, double value, Dictionary<string, object> attributes)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Components.ElementReference | ticksRef | ticksRef. |
System.String | text | text. |
System.Double | value | sliderValue. |
System.Collections.Generic.Dictionary<System.String, System.Object> | attributes | attributes. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SliderTickEventArgs> | ="Task". |