TrackBarRenderer Class

 

Provides methods used to render a track bar control with visual styles. This class cannot be inherited.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

System.Object
  System.Windows.Forms.TrackBarRenderer

[<Sealed>]
type TrackBarRenderer = class end

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticIsSupported

Gets a value indicating whether the TrackBarRenderer class can be used to draw a track bar with visual styles.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDrawBottomPointingThumb(Graphics, Rectangle, TrackBarThumbState)

Draws a downward-pointing track bar slider (also known as the thumb) with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawHorizontalThumb(Graphics, Rectangle, TrackBarThumbState)

Draws a horizontal track bar slider (also known as the thumb) with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawHorizontalTicks(Graphics, Rectangle, Int32, EdgeStyle)

Draws the specified number of horizontal track bar ticks with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawHorizontalTrack(Graphics, Rectangle)

Draws the track for a horizontal track bar with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawLeftPointingThumb(Graphics, Rectangle, TrackBarThumbState)

Draws a left-pointing track bar slider (also known as the thumb) with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawRightPointingThumb(Graphics, Rectangle, TrackBarThumbState)

Draws a right-pointing track bar slider (also known as the thumb) with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawTopPointingThumb(Graphics, Rectangle, TrackBarThumbState)

Draws an upward-pointing track bar slider (also known as the thumb) with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawVerticalThumb(Graphics, Rectangle, TrackBarThumbState)

Draws a vertical track bar slider (also known as the thumb) with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawVerticalTicks(Graphics, Rectangle, Int32, EdgeStyle)

Draws the specified number of vertical track bar ticks with visual styles.

System_CAPS_pubmethodSystem_CAPS_staticDrawVerticalTrack(Graphics, Rectangle)

Draws the track for a vertical track bar with visual styles.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetBottomPointingThumbSize(Graphics, TrackBarThumbState)

Returns the size, in pixels, of the track bar slider (also known as the thumb) that points down.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetLeftPointingThumbSize(Graphics, TrackBarThumbState)

Returns the size, in pixels, of the track bar slider (also known as the thumb) that points to the left.

System_CAPS_pubmethodSystem_CAPS_staticGetRightPointingThumbSize(Graphics, TrackBarThumbState)

Returns the size, in pixels, of the track bar slider (also known as the thumb) that points to the right.

System_CAPS_pubmethodSystem_CAPS_staticGetTopPointingThumbSize(Graphics, TrackBarThumbState)

Returns the size, in pixels, of the track bar slider (also known as the thumb) that points up.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The TrackBarRenderer class provides a set of static methods that can be used to render each part of a track bar control with the current visual style of the operating system. Rendering a control refers to drawing the user interface of a control. This is useful if you are drawing a custom control that should have the appearance of the current visual style.

If visual styles are enabled in the operating system and visual styles are applied to the client area of application windows, the methods in this class will draw the track bar with the current visual style. Otherwise, the methods in this class will throw an InvalidOperationException. To determine whether the members of this class can be used, you can check the value of the IsSupported property.

This class wraps the functionality of a System.Windows.Forms.VisualStyles.VisualStyleRenderer that is set to one of the elements exposed by the System.Windows.Forms.VisualStyles.VisualStyleElement.TrackBar class. For more information, see Rendering Controls with Visual Styles.

WinXpFamily

Visual styles are supported only on these platforms.

The following code example demonstrates how to create a custom control that uses the TrackBarRenderer methods to draw a horizontal track bar that responds to mouse clicks.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: