Export (0) Print
Expand All

TrackBarRenderer Class

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

System.Object
  System.Windows.Forms.TrackBarRenderer

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

[<Sealed>]
type TrackBarRenderer =  class end

The TrackBarRenderer type exposes the following members.

  NameDescription
Public propertyStatic memberIsSupportedGets a value indicating whether the TrackBarRenderer class can be used to draw a track bar with visual styles.
Top

  NameDescription
Public methodStatic memberDrawBottomPointingThumbDraws a downward-pointing track bar slider (also known as the thumb) with visual styles.
Public methodStatic memberDrawHorizontalThumbDraws a horizontal track bar slider (also known as the thumb) with visual styles.
Public methodStatic memberDrawHorizontalTicksDraws the specified number of horizontal track bar ticks with visual styles.
Public methodStatic memberDrawHorizontalTrackDraws the track for a horizontal track bar with visual styles.
Public methodStatic memberDrawLeftPointingThumbDraws a left-pointing track bar slider (also known as the thumb) with visual styles.
Public methodStatic memberDrawRightPointingThumbDraws a right-pointing track bar slider (also known as the thumb) with visual styles.
Public methodStatic memberDrawTopPointingThumbDraws an upward-pointing track bar slider (also known as the thumb) with visual styles.
Public methodStatic memberDrawVerticalThumbDraws a vertical track bar slider (also known as the thumb) with visual styles.
Public methodStatic memberDrawVerticalTicksDraws the specified number of vertical track bar ticks with visual styles.
Public methodStatic memberDrawVerticalTrackDraws the track for a vertical track bar with visual styles.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodStatic memberGetBottomPointingThumbSizeReturns the size, in pixels, of the track bar slider (also known as the thumb) that points down.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodStatic memberGetLeftPointingThumbSizeReturns the size, in pixels, of the track bar slider (also known as the thumb) that points to the left.
Public methodStatic memberGetRightPointingThumbSizeReturns the size, in pixels, of the track bar slider (also known as the thumb) that points to the right.
Public methodStatic memberGetTopPointingThumbSizeReturns the size, in pixels, of the track bar slider (also known as the thumb) that points up.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

Windows XP Home Edition, Windows XP Professional x64 Edition, Windows Server 2003 Platform Note: 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

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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