menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SliderTickRenderedEventArgs - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SliderTickRenderedEventArgs

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

    Inheritance
    System.Object
    SliderTickRenderedEventArgs
    Namespace: Syncfusion.Blazor.Inputs
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SliderTickRenderedEventArgs : Object
    Remarks

    This class provides information about the tick elements after they have been rendered in the DOM. It contains references to all rendered tick elements and their container, allowing for post-rendering operations such as animations, measurements, or advanced styling that requires the elements to be present in the DOM.

    Examples

    Using SliderTickRenderedEventArgs for post-rendering operations:

    <SfSlider @bind-Value="sliderValue" TValue="int" Min="0" Max="100" Step="10">
        <SliderTicks Placement="Placement.After" LargeStep="20" SmallStep="10" />
        <SliderEvents TValue="int" TicksRendered="OnTicksRendered" />
    </SfSlider>
    
    @code {
        private int sliderValue = 30;
    
        private void OnTicksRendered(SliderTickRenderedEventArgs args)
        {
            // Apply custom styling or animations to rendered ticks
            args.HtmlAttributes = new Dictionary<string, object> 
            { 
                { "class", "rendered-ticks" },
                { "data-tick-count", args.TickElementsRef?.Count ?? 0 }
            };
        }
    }

    Constructors

    SliderTickRenderedEventArgs()

    Declaration
    public SliderTickRenderedEventArgs()

    Properties

    HtmlAttributes

    Gets or sets the HTML attributes used to customize the tick container element.

    Declaration
    public Dictionary<string, object> HtmlAttributes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.Object>

    A System.Collections.Generic.Dictionary<, > of string keys and object values representing HTML attributes to apply to the tick container element. The default value is null.

    Remarks

    This property allows customization of the container element that holds all tick elements. The attributes are applied to the parent container and can include CSS classes, styles, data attributes, or other HTML attributes that affect the entire tick container's appearance and behavior.

    TickElementsRef

    Gets or sets the collection of references to all rendered tick elements.

    Declaration
    public List<ElementReference> TickElementsRef { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<Microsoft.AspNetCore.Components.ElementReference>

    A System.Collections.Generic.List<> of Microsoft.AspNetCore.Components.ElementReference objects representing all the tick elements that have been rendered. The default value is null.

    Remarks

    This property provides access to DOM references for all tick elements after they have been rendered. It can be used for post-rendering operations such as applying animations, measuring element dimensions, or performing JavaScript interop operations on the tick elements.

    TicksContainerRef

    Gets or sets the reference to the container element that holds all tick elements.

    Declaration
    public ElementReference TicksContainerRef { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.ElementReference

    An Microsoft.AspNetCore.Components.ElementReference to the DOM element that serves as the container for all tick elements.

    Remarks

    This property provides access to the parent container element that holds all the individual tick elements. It can be used to apply container-level styling, perform measurements, or manipulate the entire tick container through JavaScript interop operations.

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