Show / Hide Table of Contents

    Interface ISliderComponent

    A slider component allows selecting a numeric value between an allowed range, by dragging a handle across a line (usually).

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    [RequiredComponent(typeof(IBoundingBoxComponent), true)]
    [RequiredComponent(typeof(IDrawableInfoComponent), true)]
    [RequiredComponent(typeof(IInObjectTreeComponent), true)]
    [RequiredComponent(typeof(IVisibleComponent), true)]
    [RequiredComponent(typeof(IEnabledComponent), true)]
    [RequiredComponent(typeof(IUIEvents), true)]
    public interface ISliderComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    AllowKeyboardControl

    Gets or sets a value indicating whether this ISliderComponent allows keyboard control for moving the slider when it is in focus (i.e after the user clicked on the slider). Default is true.

    Declaration
    bool AllowKeyboardControl { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if allow keyboard control; otherwise, false.

    | Improve this Doc View Source

    Direction

    Gets or sets the direction of the slider. If, for example, the slider's direction is bottom-to-top then the minimum value will correspond with the bottom most location on the slider and the maximum value will correspond with the top most location on the slider.

    Declaration
    SliderDirection Direction { get; set; }
    Property Value
    Type Description
    SliderDirection

    true if is horizontal; otherwise, false.

    | Improve this Doc View Source

    Graphics

    Gets or sets the graphics of the slider (on which the handle will be dragged).

    Declaration
    IObject Graphics { get; set; }
    Property Value
    Type Description
    IObject

    The graphics.

    | Improve this Doc View Source

    HandleGraphics

    Gets or sets the handle graphics (the handle is the object the user drags to change the value).

    Declaration
    IObject HandleGraphics { get; set; }
    Property Value
    Type Description
    IObject

    The handle graphics.

    | Improve this Doc View Source

    Label

    Gets or sets an optional label which shows the value as text.

    Declaration
    ILabel Label { get; set; }
    Property Value
    Type Description
    ILabel

    The label.

    | Improve this Doc View Source

    MaxHandleOffset

    Gets or sets an offset for the handle to be placed from the maximum X/Y of the background image. This can be useful for properly aligning the handle to the background graphics.

    Declaration
    float MaxHandleOffset { get; set; }
    Property Value
    Type Description
    System.Single

    The minimum handle offset.

    | Improve this Doc View Source

    MaxValue

    Gets or sets the allowed maximum value.

    Declaration
    float MaxValue { get; set; }
    Property Value
    Type Description
    System.Single

    The max value.

    | Improve this Doc View Source

    MinHandleOffset

    Gets or sets an offset for the handle to be placed from the minimum X/Y of the background image. This can be useful for properly aligning the handle to the background graphics.

    Declaration
    float MinHandleOffset { get; set; }
    Property Value
    Type Description
    System.Single

    The minimum handle offset.

    | Improve this Doc View Source

    MinValue

    Gets or sets the allowed minimum value.

    Declaration
    float MinValue { get; set; }
    Property Value
    Type Description
    System.Single

    The minimum value.

    | Improve this Doc View Source

    OnValueChanged

    An event which is triggered when the slider value has changed. This only gets called after user finishes dragging the handle on the slider. For continous refreshes as the user drags the handle, OnValueChanging.

    Declaration
    IBlockingEvent<SliderValueEventArgs> OnValueChanged { get; }
    Property Value
    Type Description
    IBlockingEvent<SliderValueEventArgs>

    The on value changed.

    | Improve this Doc View Source

    OnValueChanging

    An event which is triggered when the slider value is changing. This will be fired continously as the user drags the handle on the slider. If you need an event which fires only when the user finishes dragging, OnValueChanged.

    Declaration
    IBlockingEvent<SliderValueEventArgs> OnValueChanging { get; }
    Property Value
    Type Description
    IBlockingEvent<SliderValueEventArgs>

    The on value changed.

    | Improve this Doc View Source

    ShouldClampValuesWhenChangingMinMax

    Gets or sets a value indicating whether this ISliderComponent should clamp the slider value to the minimum and/or maximum when those change. This is enabled by default. For example, if the slider value is 100 and I updated the maximum from 200 to 50, if this property is enabled, the value will automatically change to 50. If the property is disabled, the value will stay at 100.

    Declaration
    bool ShouldClampValuesWhenChangingMinMax { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if should clamp values when changing minimum max; otherwise, false.

    | Improve this Doc View Source

    Value

    Gets or sets the slider's value. Note that the value will be clamped to MinValue and MaxValue (in other words, if you try to set a value above the maximum it will set it to the maximum, and the same for the minimum value).

    Declaration
    float Value { get; set; }
    Property Value
    Type Description
    System.Single

    The value.

    Methods

    | Improve this Doc View Source

    Decrease(Single)

    Decrease the the slider by the specified amount. This checks for a case where the value is above the maximum (could happen when ShouldClampValuesWhenChangingMinMax is false), and if true it decreases the value from the maximum and not from the current value.

    Declaration
    void Decrease(float step)
    Parameters
    Type Name Description
    System.Single step

    Step.

    | Improve this Doc View Source

    Increase(Single)

    Increase the the slider by the specified amount. This checks for a case where the value is below the minimum (could happen when ShouldClampValuesWhenChangingMinMax is false), and if true it increases the value from the minimum and not from the current value.

    Declaration
    void Increase(float step)
    Parameters
    Type Name Description
    System.Single step

    Step.

    | Improve this Doc View Source

    IsHorizontal()

    Is the slider horizontal (RightToLeft or LeftToRight) or vertical (TopToBottom or BottomToTop)?

    Declaration
    bool IsHorizontal()
    Returns
    Type Description
    System.Boolean

    true, if the slider is horizontal, false otherwise.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX