Slider
Definition
This class is used to display a Slider
.
A Slider
is a progress bar that adds a draggable thumb. You can touch the thumb and drag left or right to set the slider thumb position. As the Slider thumb is dragged, it will trigger the PositionChanged
event, reporting the position of the Slider
thumb. The reported position of the thumb can be used to dynamically update another component attribute, such as the TextBox
’s FontSize
of a TextBox
or the Radius of a Ball
.
The Slider
uses the following default values. However these values can be changed through the Designer or Blocks editor:
MinValue
= 10MaxValue
= 50ThumbPosition
= 30
Properties
- ColorLeft
- Specifies the color of the slider bar to the left of the thumb as an alpha-red-green-blue integer, i.e.,
0xAARRGGBB
. An alpha of00
indicates fully transparent andFF
means opaque. - ColorRight
- Specifies the color of the slider bar to the right of the thumb as an alpha-red-green-blue integer, i.e.,
0xAARRGGBB
. An alpha of00
indicates fully transparent andFF
means opaque. - HeightPercent
- Specifies the
Slider
’s vertical height as a percentage of theScreen
’sHeight
. - MaxValue
- Sets the maximum value of slider. If the new maximum is less than the current minimum, then minimum and maximum will both be set to this value. Setting
MaxValue
resets the thumb position to halfway betweenMinValue
andMaxValue
and signals thePositionChanged
` event. - MinValue
- Sets the minimum value of slider. If the new minimum is greater than the current maximum, then minimum and maximum will both be set to this value. Setting
MinValue
resets the thumb position to halfway betweenMinValue
andMaxValue
and signals thePositionChanged
` event. - ThumbEnabled
- Whether or not the slider thumb is being be shown.
- ThumbPosition
- Sets the position of the slider thumb. If this value is greater than
MaxValue
, then it will be set to same value asMaxValue
. If this value is less thanMinValue
, then it will be set to same value asMinValue
. - Visible
- Specifies whether the
Slider
should be visible on the screen. Value istrue
if theSlider
is showing andfalse
if hidden. - Width
- Specifies the horizontal width of the
Slider
, measured in pixels. - WidthPercent
- Specifies the horizontal width of the
Slider
as a percentage of theScreen
’sWidth
.