Class SliderLabelInfo
It helps the user to display labels that associate a numeric value with major tick marks.
Inheritance
System.Object
SliderLabelInfo
Assembly: Syncfusion.Sliders.WinUI.dll
Syntax
public class SliderLabelInfo : Object
Examples
public override List<SliderLabelInfo> GenerateVisibleLabels()
{
List<SliderLabelInfo> labelInfos = new List<SliderLabelInfo>();
int minimum = (int)LogBase(this.Minimum, 10);
int maximum = (int)LogBase(this.Maximum, 10);
for (int i = minimum; i <= maximum; i++)
{
double value = Math.Floor(Math.Pow(10, i)); // logBase value is 10
SliderLabelInfo label = new SliderLabelInfo()
{
Value = value,
Text = value.ToString()
};
labelInfos.Add(label);
}
labelsCount = labelInfos.Count;
return labelInfos;
}
private double LogBase(double value, int baseValue)
{
return Math.Log(value) / Math.Log(baseValue);
}
Constructors
SliderLabelInfo()
Declaration
Examples
public override List<SliderLabelInfo> GenerateVisibleLabels()
{
List<SliderLabelInfo> labelInfos = new List<SliderLabelInfo>();
int minimum = (int)LogBase(this.Minimum, 10);
int maximum = (int)LogBase(this.Maximum, 10);
for (int i = minimum; i <= maximum; i++)
{
double value = Math.Floor(Math.Pow(10, i)); // logBase value is 10
SliderLabelInfo label = new SliderLabelInfo()
{
Value = value,
Text = value.ToString()
};
labelInfos.Add(label);
}
labelsCount = labelInfos.Count;
return labelInfos;
}
private double LogBase(double value, int baseValue)
{
return Math.Log(value) / Math.Log(baseValue);
}
Properties
Text
Gets or sets the text to display in label.
Declaration
public string Text { get; set; }
Property Value
Type |
Description |
System.String |
It contains the string of the label.
|
Value
Gets or sets the value of the label.
Declaration
public double Value { get; set; }
Property Value
Type |
Description |
System.Double |
It contains the value of the label.
|