Table of Contents

Class StdSlider

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Represents a generic slider control (also known as track bar). This control is implemented inside the library and doesn't use native slider control.

[DefaultBindingProperty("Value")]
[ControlCategory("Common")]
public class StdSlider : Border, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo, ISliderScaleContainer
Inheritance
StdSlider
Implements

Remarks

This is a scrollable control similar to the scroll bar control. You can configure ranges through which the value of the Value property of a slider scrolls by setting the Minimum property to specify the lower end of the range and the Maximum property to specify the upper end of the range.

The slider can be displayed horizontally or vertically.

You can use this control to input numeric data obtained through the Value property. You can display this numeric data in a control or use it in code.

Constructors

StdSlider()

Initializes a new instance of the StdSlider class.

StdSlider(Control)

Initializes a new instance of the StdSlider class.

Fields

DefaultBottomBorderVisible

Gets or sets whether bottom border is visible by default.

DefaultHasBorder

Gets or sets whether control has border by default.

DefaultLeftBorderVisible

Gets or sets whether left border is visible by default.

DefaultRightBorderVisible

Gets or sets whether right border is visible by default.

DefaultScaleSize

Represents the default size of the left/top and right/bottom indicators.

DefaultSliderMinimumSize

Represents the default minimum size for a slider control.

DefaultSliderThumbWidth

Represents the default width of the slider's thumb.

DefaultSpaceSizeInPercentOfThumb

Represents the default size of the space, as a percentage of the thumb size.

DefaultThumbCornerRadius

Specifies the default corner radius to apply to the slider thumb.

DefaultThumbCornerRadiusIsPercent

Indicates whether the default thumb corner radius is expressed as a percentage.

DefaultThumbHasBorder

Gets or sets whether slider thumb has border by default.

DefaultTickStyle

Represents the default tick style for a slider control.

DefaultTopBorderVisible

Gets or sets whether top border is visible by default.

DefaultUseControlColors

Gets or sets a value indicating whether the slider control uses the ControlBackColor and ControlForeColor. Default is true.

DefaultUseSpacerColor

Gets or sets whether to use default spacer color.

Properties

AutoSize

Gets or sets a value indicating whether the slider control automatically sizes itself. If slider is horizontal and is set to auto-size, it will adjust its height automatically. If slider is vertical and is set to auto-size, it will adjust its width automatically. Default is true.

BorderColor

Gets or sets the border color for the Border control.

ControlKind

Returns control identifier.

DefaultSecondarySpacerColor

Gets default secondary spacer color of the slider. This value is used when UseSpacerColor is True.

DefaultSpacerColor

Gets default spacer color of the slider. This value is used when UseSpacerColor is True.

DefaultThumbBackColor

Gets or sets default slider thumb background color.

DefaultThumbBorderColor

Gets or sets default slider thumb border color.

HasBorder

Gets or sets a value indicating whether the control has a border.

HorizontalAlignment

Gets or sets the horizontal alignment applied to this control when it is positioned within a parent control.

IsFirstTickVisible

Gets or sets whether the first tick mark is visible on the slider scale.

IsHorizontal

Gets or sets a value indicating whether the slider is horizontal.

IsLastTickVisible

Gets or sets whether the last tick mark is visible on the slider scale.

IsVertical

Gets or sets a value indicating whether the slider is vertical.

LargeChange

Gets or sets a value to be added to or subtracted from the Value property when the thumb is moved a large distance.

LeftTopScale

Gets the left/top scale control of the slider.

LeftTopSpacer

Gets the left/top spacer control of the slider.

LeftTopSpacerSize

Gets the current size of the left/top spacer control.

MaxLeftTopSpacerSize

Gets the maximum possible size of the left/top spacer control.

Maximum

Gets or sets the upper limit of the range this control is working with.

MinPadding

Gets minimal padding value.

Minimum

Gets or sets the lower limit of the range this control is working with.

Orientation

Gets or sets a value indicating the horizontal or vertical orientation of the slider.

Padding

Gets or sets the padding inside a control.

RightBottomScale

Gets the right/bottom scale control of the slider.

RightBottomSpacer

Gets the right/bottom spacer control of the slider.

SmallChange

Gets or sets the value added to or subtracted from the Value property when the thumb is moved a small distance.

SpaceSizeInPercentOfThumb

Gets or sets the size of the spacer, as a percentage of the thumb size.

SuggestedSize

Gets or sets the suggested size of the control.

ThumbControl

Gets the thumb control of the slider.

ThumbSize

Gets the size of the thumb control.

TickFrequency

Gets or sets a value that specifies the delta between ticks drawn on the control.

TickStyle

Gets or sets a value indicating how to display the tick marks on the slider.

UseSpacerColor

Gets or sets whether spacer background colors are automatically updated with the default spacer colors.

Value

Gets or sets a numeric value that represents the current position of the thumb on the slider.

ValueDisplay

Gets or sets the display control for the slider value.

ValueFormat

Gets or sets the format string used to display the value of the slider.

VerticalAlignment

Gets or sets the vertical alignment applied to this control when it is positioned within a parent control.

Methods

ClearTicks()

Clears the ticks.

CoerceMaximum(int)

Coerces minimal value to have the valid range.

CoerceValue(int)

Coerces value the have the valid range.

CreateScale(bool)

Creates an scale control for the slider.

CreateSliderThumb()

Creates slider thumb control.

CreateSpacer()

Creates a spacer control for the slider.

DecValue()

Decreases the Value property by the SmallChange value.

DecValueLarge()

Decreases the Value property by the LargeChange value.

DefaultPaint(PaintEventArgs)

Default painting method of the UserControl and its descendants.

GetDefaultHasBorder()

Gets default value for HasBorder.

GetPreferredSize(PreferredSizeContext)

Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.

GetSpacerRectangles(out RectD, out RectD)

Calculates and retrieves the bounding rectangles for the left-top and right-bottom spacer elements based on the current thumb bounds and orientation.

IncValue()

Increases the Value property by the SmallChange value.

IncValueLarge()

Increases the Value property by the LargeChange value.

OnHandleCreated(EventArgs)

Called when the control's handle is created.

OnLeftTopSpacerMouseDown(object?, MouseEventArgs)

Handles the mouse down event on the left/top spacer.

OnMaximumChanged(EventArgs)

Called when the maximum of the Maximum property changes.

OnMinimumChanged(EventArgs)

Called when the minimum of the Minimum property changes.

OnRightBottomSpacerMouseDown(object?, MouseEventArgs)

Handles the mouse down event on the right/bottom spacer.

OnSizeChanged(EventArgs)

Called when the SizeChanged event.

OnThumbSplitterMoved(object?, SplitterEventArgs)

Handles the event triggered when the thumb splitter is moved.

OnThumbSplitterMoving(object?, SplitterEventArgs)

Handles the event triggered when the thumb splitter is moving.

OnValueChanged(EventArgs)

Called when the value of the Value property changes.

RaiseMaximumChanged(EventArgs)

Raises the MaximumChanged event and calls OnMaximumChanged(EventArgs).

RaiseMinimumChanged(EventArgs)

Raises the MinimumChanged event and calls OnMinimumChanged(EventArgs).

RaiseValueChanged()

Raises the ValueChanged event and calls OnValueChanged(EventArgs).

ScaleValueToPosition(int)

Scales a numeric value to a position on the slider.

SetFarSpacerColor(Color?)

Sets the colors of the right/bottom spacer.

SetFarSpacerColorToDefault()

Sets right/bottom spacer color to default.

SetSpacerColor(Color?)

Sets the colors of the left/top spacer.

SetSpacerColorToDefault()

Sets left/top spacer color to default.

UpdateDefaultSpacerColors()

Updates default spacer colors.

UpdateScaleVisibility()

Updates the visibility of the indicators based on the current state of the TickStyle property.

UpdateThumbPositionFromValue()

Updates the position of the thumb control based on the current state of the control.

UpdateValueDisplay()

Updates the display of the current value in the ValueDisplay control.

UpdateValueFromThumbPosition()

Updates the Value property based on the current position of the thumb control.

Events

FormatValueForDisplay

Occurs when the Value property is formatted for display before it is assigned to display control specified in the ValueDisplay property.

LargeChangeChanged

Occurs when the value of the LargeChange property changes.

MaximumChanged

Occurs when the value of the Maximum property changes.

MinimumChanged

Occurs when the value of the Minimum property changes.

OrientationChanged

Occurs when the value of the Orientation property changes.

SmallChangeChanged

Occurs when the value of the SmallChange property changes.

TickFrequencyChanged

Occurs when the value of the TickFrequency property changes.

TickStyleChanged

Occurs when the value of the TickStyle property changes.

ValueChanged

Occurs when the Value property of a slider changes, either by movement of the scroll box or by manipulation in code.