-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSliderState.cs
More file actions
27 lines (23 loc) · 1.06 KB
/
Copy pathSliderState.cs
File metadata and controls
27 lines (23 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using DevExpress.Blazor;
using System.Text.Json.Serialization;
namespace BlazorSlider.Components.Slider;
public enum SliderValueChangeMode { OnHandleMove, OnHandleRelease }
public enum TooltipShowMode { OnHover, Always }
public class SliderState<T> where T : struct {
public T Value { get; set; }
public T? Step { get; set; }
public T MinValue { get; set; }
public T MaxValue { get; set; }
public bool ShowRange { get; set; } = true;
public bool Enabled { get; set; } = true;
[JsonConverter(typeof(JsonStringEnumConverter))]
public SliderValueChangeMode ValueChangeMode { get; set; }
public bool LabelVisible { get; set; }
[JsonConverter(typeof(JsonStringEnumConverter))]
public VerticalEdge LabelPosition { get; set; } = VerticalEdge.Bottom;
[JsonConverter(typeof(JsonStringEnumConverter))]
public VerticalEdge TooltipPosition { get; set; } = VerticalEdge.Top;
[JsonConverter(typeof(JsonStringEnumConverter))]
public TooltipShowMode TooltipShowMode { get; set; }
public bool TooltipEnabled { get; set; }
}