menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SliderTooltipEventArgs<T> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SliderTooltipEventArgs<T>

    Represents the event arguments for the TooltipChange event in the Slider component.

    Inheritance
    System.Object
    SliderTooltipEventArgs<T>
    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 string representing the text content shown in the tooltip. The default value is null.

    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 T representing the current slider value for which the tooltip is being displayed. The default value is null.

    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.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved