Class SliderTooltipEventArgs<T>
Represents the event arguments for the TooltipChange event in the Slider component.
Inheritance
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public class SliderTooltipEventArgs<T> : Object
Type Parameters
Name | Description |
---|---|
T | The type of the slider value. |
Remarks
This class provides information about tooltip changes in the slider component, including the tooltip text and the associated slider value. It allows for customization of tooltip content and behavior during tooltip events.
Examples
Using SliderTooltipEventArgs to customize tooltip content:
<SfSlider @bind-Value="sliderValue" TValue="int" Min="0" Max="100">
<SliderTooltip IsVisible="true" Placement="TooltipPlacement.Top" />
<SliderEvents TValue="int" TooltipChange="OnTooltipChange" />
</SfSlider>
@code {
private int sliderValue = 50;
private void OnTooltipChange(SliderTooltipEventArgs<int> args)
{
args.Text = $"Value: {args.Value}%";
}
}
Constructors
SliderTooltipEventArgs()
Declaration
public SliderTooltipEventArgs()
Properties
Text
Gets or sets the text content displayed in the slider tooltip.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This property allows customization of the tooltip text content. The text can be modified during the TooltipChange event to provide custom formatting, additional information, or context-specific content based on the slider value.
Value
Gets or sets the current value of the slider associated with the tooltip.
Declaration
public T Value { get; set; }
Property Value
Type | Description |
---|---|
T | The value of type |
Remarks
This property provides the slider value that corresponds to the current tooltip display. It can be used in conjunction with the Text property to create custom tooltip content based on the slider value.