docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SliderBase<TValueType>

    Base class for Sliders (SliderFloat, SliderInt).

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    ExVisualElement
    BaseSlider<TValueType, TValueType>
    SliderBase<TValueType>
    SliderFloat
    SliderInt
    Implements
    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement
    IInputElement<TValueType>
    IValidatableElement<TValueType>
    INotifyValueChanging<TValueType>
    INotifyValueChanged<TValueType>
    Inherited Members
    BaseSlider<TValueType, TValueType>.m_DraggerManipulator
    BaseSlider<TValueType, TValueType>.m_HighValue
    BaseSlider<TValueType, TValueType>.m_LowValue
    BaseSlider<TValueType, TValueType>.m_PreviousValue
    BaseSlider<TValueType, TValueType>.m_Value
    BaseSlider<TValueType, TValueType>.m_CurrentDirection
    BaseSlider<TValueType, TValueType>.lowValue
    BaseSlider<TValueType, TValueType>.highValue
    BaseSlider<TValueType, TValueType>.formatString
    BaseSlider<TValueType, TValueType>.SetValueWithoutNotify(TValueType)
    BaseSlider<TValueType, TValueType>.value
    BaseSlider<TValueType, TValueType>.invalid
    BaseSlider<TValueType, TValueType>.validateValue
    BaseSlider<TValueType, TValueType>.OnSliderRangeChanged()
    BaseSlider<TValueType, TValueType>.InvokeValueChangedCallbacks()
    BaseSlider<TValueType, TValueType>.OnGeometryChanged(GeometryChangedEvent)
    BaseSlider<TValueType, TValueType>.OnDirectionChanged(ContextChangedEvent<DirContext>)
    BaseSlider<TValueType, TValueType>.OnTrackUp(Draggable)
    BaseSlider<TValueType, TValueType>.OnTrackDown(Draggable)
    BaseSlider<TValueType, TValueType>.OnTrackDragged(Draggable)
    BaseSlider<TValueType, TValueType>.SetValueFromDrag(float)
    BaseSlider<TValueType, TValueType>.GetSliderRect()
    BaseSlider<TValueType, TValueType>.ComputeValueFromHandlePosition(float, float)
    BaseSlider<TValueType, TValueType>.OnTrackClicked()
    BaseSlider<TValueType, TValueType>.GetClampedValue(TValueType)
    BaseSlider<TValueType, TValueType>.ClampValue()
    BaseSlider<TValueType, TValueType>.Clamp(TValueType, TValueType, TValueType)
    BaseSlider<TValueType, TValueType>.ParseValueToString(TValueType)
    BaseSlider<TValueType, TValueType>.ParseRawValueToString(TValueType)
    BaseSlider<TValueType, TValueType>.ParseHandleValueToString(TValueType)
    BaseSlider<TValueType, TValueType>.ParseStringToValue(string, out TValueType)
    BaseSlider<TValueType, TValueType>.SliderLerpUnclamped(TValueType, TValueType, float)
    BaseSlider<TValueType, TValueType>.SliderNormalizeValue(TValueType, TValueType, TValueType)
    BaseSlider<TValueType, TValueType>.Decrement(TValueType)
    BaseSlider<TValueType, TValueType>.Increment(TValueType)
    ExVisualElement.contentContainer
    ExVisualElement.outlineColor
    ExVisualElement.backgroundColor
    ExVisualElement.passMask
    BaseVisualElement.contextPrefix
    BaseVisualElement.scaleOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.ExecuteDefaultAction(EventBase)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    VisualElement.resolvedStyle
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.HandleEvent(EventBase)
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public abstract class SliderBase<TValueType> : BaseSlider<TValueType, TValueType>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<TValueType>, IValidatableElement<TValueType>, INotifyValueChanging<TValueType>, INotifyValueChanged<TValueType> where TValueType : struct, IEquatable<TValueType>, IComparable
    Type Parameters
    Name Description
    TValueType

    A comparable value type.

    Constructors

    SliderBase()

    Default constructor.

    Declaration
    protected SliderBase()

    Fields

    controlContainerUssClassName

    The Slider control container styling class.

    Declaration
    public const string controlContainerUssClassName = "appui-slider__control-container"
    Field Value
    Type Description
    string

    controlsUssClassName

    The Slider controls styling class.

    Declaration
    public const string controlsUssClassName = "appui-slider__controls"
    Field Value
    Type Description
    string

    handleContainerUssClassName

    The Slider handle container styling class.

    Declaration
    public const string handleContainerUssClassName = "appui-slider__handle-container"
    Field Value
    Type Description
    string

    handleUssClassName

    The Slider handle styling class.

    Declaration
    public const string handleUssClassName = "appui-slider__handle"
    Field Value
    Type Description
    string

    inlineValueLabelUssClassName

    The Slider inline value label styling class.

    Declaration
    public const string inlineValueLabelUssClassName = "appui-slider__inline-valuelabel"
    Field Value
    Type Description
    string

    inlineValueUssClassName

    The Slider inline value styling class.

    Declaration
    public const string inlineValueUssClassName = "appui-slider--inline-value-"
    Field Value
    Type Description
    string

    interactiveAreaUssClassName

    The Slider progress container styling class.

    Declaration
    public const string interactiveAreaUssClassName = "appui-slider__interactive-area"
    Field Value
    Type Description
    string

    labelContainerUssClassName

    The Slider label container styling class.

    Declaration
    public const string labelContainerUssClassName = "appui-slider__labelcontainer"
    Field Value
    Type Description
    string

    labelUssClassName

    The Slider label styling class.

    Declaration
    public const string labelUssClassName = "appui-slider__label"
    Field Value
    Type Description
    string

    noLabelUssClassName

    The Slider no label variant styling class.

    Declaration
    public const string noLabelUssClassName = "appui-slider--no-label"
    Field Value
    Type Description
    string

    paddedContainerUssClassName

    The Slider padded container styling class.

    Declaration
    public const string paddedContainerUssClassName = "appui-slider__padded-container"
    Field Value
    Type Description
    string

    progressUssClassName

    The Slider progress styling class.

    Declaration
    public const string progressUssClassName = "appui-slider__progress"
    Field Value
    Type Description
    string

    sizeUssClassName

    The Slider size styling class.

    Declaration
    public const string sizeUssClassName = "appui-slider--size-"
    Field Value
    Type Description
    string

    tickLabelUssClassName

    The Slider tick label styling class.

    Declaration
    public const string tickLabelUssClassName = "appui-slider__ticklabel"
    Field Value
    Type Description
    string

    tickLabelVariantUssClassName

    The Slider with tick labels variant styling class.

    Declaration
    public const string tickLabelVariantUssClassName = "appui-slider--tick-labels"
    Field Value
    Type Description
    string

    tickUssClassName

    The Slider tick styling class.

    Declaration
    public const string tickUssClassName = "appui-slider__tick"
    Field Value
    Type Description
    string

    ticksUssClassName

    The Slider ticks container styling class.

    Declaration
    public const string ticksUssClassName = "appui-slider__ticks"
    Field Value
    Type Description
    string

    trackUssClassName

    The Slider track styling class.

    Declaration
    public const string trackUssClassName = "appui-slider__track"
    Field Value
    Type Description
    string

    ussClassName

    The Slider main styling class.

    Declaration
    public const string ussClassName = "appui-slider"
    Field Value
    Type Description
    string

    valueLabelUssClassName

    The Slider value label styling class.

    Declaration
    public const string valueLabelUssClassName = "appui-slider__valuelabel"
    Field Value
    Type Description
    string

    Properties

    fillOffset

    Should be normalized.

    Declaration
    public float fillOffset { get; set; }
    Property Value
    Type Description
    float

    filled

    If the slider progress is filled.

    Declaration
    public bool filled { get; set; }
    Property Value
    Type Description
    bool

    inlineValue

    The inline mode for the slider value element.

    Declaration
    public InlineValue inlineValue { get; set; }
    Property Value
    Type Description
    InlineValue

    label

    Text which will be used for the Slider label.

    Declaration
    public string label { get; set; }
    Property Value
    Type Description
    string

    size

    The size of the slider.

    Declaration
    public Size size { get; set; }
    Property Value
    Type Description
    Size

    tickCount

    The number of ticks to display on the slider.

    Declaration
    public int tickCount { get; set; }
    Property Value
    Type Description
    int

    tickLabel

    Should the tick labels be displayed.

    Declaration
    public bool tickLabel { get; set; }
    Property Value
    Type Description
    bool

    Methods

    Clamp(TValueType, TValueType, TValueType)

    Utility method to clamp a TValueType value between specified bounds.

    Declaration
    protected override TValueType Clamp(TValueType v, TValueType lowBound, TValueType highBound)
    Parameters
    Type Name Description
    TValueType v

    The value to clamp.

    TValueType lowBound

    Minimum

    TValueType highBound

    Maximum

    Returns
    Type Description
    TValueType

    The clamped value.

    Overrides
    BaseSlider<TValueType, TValueType>.Clamp(TValueType, TValueType, TValueType)

    GetInlineValueUssClassName(InlineValue)

    Declaration
    public static string GetInlineValueUssClassName(InlineValue enumValue)
    Parameters
    Type Name Description
    InlineValue enumValue
    Returns
    Type Description
    string

    GetSizeUssClassName(Size)

    Declaration
    public static string GetSizeUssClassName(Size enumValue)
    Parameters
    Type Name Description
    Size enumValue
    Returns
    Type Description
    string

    GetSliderRect()

    Returns the rect of the interactive part of the slider.

    Declaration
    protected override Rect GetSliderRect()
    Returns
    Type Description
    Rect

    The rect of the interactive part of the slider.

    Overrides
    BaseSlider<TValueType, TValueType>.GetSliderRect()

    OnSliderRangeChanged()

    Called when the low or high value of Slider has changed.

    Declaration
    protected override void OnSliderRangeChanged()
    Overrides
    BaseSlider<TValueType, TValueType>.OnSliderRangeChanged()

    SetValueWithoutNotify(TValueType)

    Set the value of the slider without notifying the change.

    Declaration
    public override void SetValueWithoutNotify(TValueType newValue)
    Parameters
    Type Name Description
    TValueType newValue

    The new value of the slider.

    Overrides
    BaseSlider<TValueType, TValueType>.SetValueWithoutNotify(TValueType)

    Implements

    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement
    IInputElement<TValueType>
    IValidatableElement<TValueType>
    INotifyValueChanging<TValueType>
    INotifyValueChanged<T>

    Extension Methods

    NotifyValueChangingExtensions.RegisterValueChangingCallback<TValueType>(INotifyValueChanging<TValueType>, EventCallback<ChangingEvent<TValueType>>)
    NotifyValueChangingExtensions.UnregisterValueChangingCallback<TValueType>(INotifyValueChanging<TValueType>, EventCallback<ChangingEvent<TValueType>>)
    VisualElementExtensions.FindNavController(VisualElement)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)