Compartilhar via


SLIDER Element

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The SLIDER element provides a way to create and manipulate a simple horizontal or vertical slider control. It supports the following attributes and event handlers. Predefined SLIDER elements are also provided for convenience.

The SLIDER element supports the following attributes.

Attribute Description
backgroundColor Specifies or retrieves the background color of the slider control.
backgroundEndColor Specifies or retrieves the background ending color of the slider control.
backgroundHoverImage Specifies or retrieves the background image of the slider that appears when hovering over it with the mouse.
backgroundImage Specifies or retrieves the default background image of the slider.
borderSize Specifies or retrieves the border size in pixels.
cursor Specifies or retrieves a value indicating which type of cursor appears when the mouse is over the slider control.
direction Specifies or retrieves the direction that slider images are laid out.
disabledColor Specifies or retrieves the disabled color of the slider control.
disabledImage Specifies or retrieves the image of the slider that appears when the control is disabled.
foregroundColor Specifies or retrieves the foreground color of the slider control.
foregroundEndColor Specifies or retrieves the foreground ending color of the slider control.
foregroundHoverImage Specifies or retrieves the foreground image of the slider that appears when hovering over it with the mouse.
foregroundImage Specifies or retrieves the default foreground image of the slider.
foregroundProgress Specifies or retrieves the current position of the foreground progress bar as a percentage of the slider area.
max Specifies or retrieves the maximum value of the range defined by the slider control.
min Specifies or retrieves the minimum value of the range defined by the slider control.
slide Specifies or retrieves a value indicating whether the foreground image slides over the background image.
thumbDisabledImage Specifies or retrieves the disabled thumb image of the slider control.
thumbDownImage Specifies or retrieves the image representing the down state of the thumb.
thumbHoverImage Specifies or retrieves the image of the thumb that appears when hovering over it with the mouse.
thumbImage Specifies or retrieves the image that will be used to represent the current position of the slider.
tiled Specifies or retrieves a value indicating whether the slider images will be tiled.
toolTip Specifies or retrieves the ToolTip text for the slider control.
transparencyColor Specifies or retrieves the transparent color of the slider images.
useForegroundProgress Specifies or retrieves a value indicating whether the foreground progress bar will be used.
value Specifies and retrieves the current position of the slider.

 

The SLIDER element can implement the following event handlers.

Event handler Description
onDragBegin Handles an event that occurs when the user clicks and holds the left mouse button down and begins to drag the mouse.
onDragEnd Handles an event that occurs when the left mouse button is released after a dragging operation.
onPositionChange Handles an event that occurs when the position of the slider changes as a result of the user clicking or dragging.

 

The SLIDER element supports the ambient attributes and can implement the ambient event handlers. For more information, see Ambient Attributes and Ambient Event Handlers.

Predefined sliders are normal SLIDER elements with various common attribute settings specified by default. The following predefined sliders are available.

Predefined SLIDER Description
BALANCESLIDER A SLIDER used to set audio balance.
SEEKSLIDER A SLIDER used to seek to any position within a media file.
VOLUMESLIDER A SLIDER used to set audio volume.

 

Skin Programming Reference