System.Windows.Forms.VisualStyles.VisualStyleRenderer Members

The members of System.Windows.Forms.VisualStyles.VisualStyleRenderer are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the System.Windows.Forms.VisualStyles.VisualStyleRenderer class using the given System.Windows.Forms.VisualStyles.VisualStyleElement.

Initializes a new instance of the System.Windows.Forms.VisualStyles.VisualStyleRenderer class using the given class, part, and state values.

Public Properties

[read-only]
Classstring.

Gets the class name of the current visual style element.

[read-only]
HandleIntPtr.

Gets a unique identifier for the current class of visual style elements.

[read-only]
static
IsSupportedbool.

Gets a value specifying whether the operating system is using visual styles to draw controls.

[read-only]
LastHResultint.

Gets the last error code returned by the native visual styles (UxTheme) API methods encapsulated by the System.Windows.Forms.VisualStyles.VisualStyleRenderer class.

[read-only]
Partint.

Gets the part of the current visual style element.

[read-only]
Stateint.

Gets the state of the current visual style element.

Public Methods

DrawBackground(System.Drawing.IDeviceContext, System.Drawing.Rectangle)

Draws the background image of the current visual style element within the specified bounding rectangle.

DrawBackground(System.Drawing.IDeviceContext, System.Drawing.Rectangle, System.Drawing.Rectangle)

Draws the background image of the current visual style element within the specified bounding rectangle and clipped to the specified clipping rectangle.

DrawEdge(System.Drawing.IDeviceContext, System.Drawing.Rectangle, Edges, EdgeStyle, EdgeEffects) : System.Drawing.Rectangle

Draws one or more edges of the specified bounding rectangle.

DrawImage(System.Drawing.Graphics, System.Drawing.Rectangle, System.Drawing.Image)

Draws the specified image within the specified bounds.

DrawImage(System.Drawing.Graphics, System.Drawing.Rectangle, System.Windows.Forms.ImageList, int)

Draws the image from the specified System.Windows.Forms.ImageList within the specified bounds.

DrawParentBackground(System.Drawing.IDeviceContext, System.Drawing.Rectangle, System.Windows.Forms.Control)

Draws the background of a control's parent in the specified area.

DrawText(System.Drawing.IDeviceContext, System.Drawing.Rectangle, string)

Draws text in the specified bounds using default formatting.

DrawText(System.Drawing.IDeviceContext, System.Drawing.Rectangle, string, bool)

Draws text in the specified bounds with the option of displaying disabled text.

DrawText(System.Drawing.IDeviceContext, System.Drawing.Rectangle, string, bool, System.Windows.Forms.TextFormatFlags)

Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text formatting.

GetBackgroundContentRectangle(System.Drawing.IDeviceContext, System.Drawing.Rectangle) : System.Drawing.Rectangle

Returns the content area for the background of the current visual style element.

GetBackgroundExtent(System.Drawing.IDeviceContext, System.Drawing.Rectangle) : System.Drawing.Rectangle

Returns the entire background area for the current visual style element.

GetBackgroundRegion(System.Drawing.IDeviceContext, System.Drawing.Rectangle) : System.Drawing.Region

Returns the region for the background of the current visual style element.

GetBoolean(BooleanProperty) : bool

Returns the value of the specified Boolean property for the current visual style element.

GetColor(ColorProperty) : System.Drawing.Color

Returns the value of the specified color property for the current visual style element.

GetEnumValue(EnumProperty) : int

Returns the value of the specified enumerated type property for the current visual style element.

GetFilename(FilenameProperty) : string

Returns the value of the specified file name property for the current visual style element.

GetFont(System.Drawing.IDeviceContext, FontProperty) : System.Drawing.Font

Returns the value of the specified font property for the current visual style element.

GetInteger(IntegerProperty) : int

Returns the value of the specified integer property for the current visual style element.

GetMargins(System.Drawing.IDeviceContext, MarginProperty) : System.Windows.Forms.Padding

Returns the value of the specified margins property for the current visual style element.

GetPartSize(System.Drawing.IDeviceContext, ThemeSizeType) : System.Drawing.Size

Returns the value of the specified size property of the current visual style part.

GetPartSize(System.Drawing.IDeviceContext, System.Drawing.Rectangle, ThemeSizeType) : System.Drawing.Size

Returns the value of the specified size property of the current visual style part using the specified drawing bounds.

GetPoint(PointProperty) : System.Drawing.Point

Returns the value of the specified point property for the current visual style element.

GetString(StringProperty) : string

Returns the value of the specified string property for the current visual style element.

GetTextExtent(System.Drawing.IDeviceContext, string, System.Windows.Forms.TextFormatFlags) : System.Drawing.Rectangle

Returns the size and location of the specified string when drawn with the font of the current visual style element.

GetTextExtent(System.Drawing.IDeviceContext, System.Drawing.Rectangle, string, System.Windows.Forms.TextFormatFlags) : System.Drawing.Rectangle

Returns the size and location of the specified string when drawn with the font of the current visual style element within the specified initial bounding rectangle.

GetTextMetrics(System.Drawing.IDeviceContext) : TextMetrics

Retrieves information about the font specified by the current visual style element.

HitTestBackground(System.Drawing.IDeviceContext, System.Drawing.Rectangle, System.Drawing.Point, HitTestOptions) : HitTestCode

Returns a hit test code indicating whether a point is contained in the background of the current visual style element.

HitTestBackground(System.Drawing.Graphics, System.Drawing.Rectangle, System.Drawing.Region, System.Drawing.Point, HitTestOptions) : HitTestCode

Returns a hit test code indicating whether the point is contained in the background of the current visual style element and within the specified bounds.

HitTestBackground(System.Drawing.IDeviceContext, System.Drawing.Rectangle, IntPtr, System.Drawing.Point, HitTestOptions) : HitTestCode

Returns a hit test code indicating whether the point is contained in the background of the current visual style element and within the specified region.

IsBackgroundPartiallyTransparent() : bool

Indicates whether the background of the current visual style element has any semitransparent or alpha-blended pieces.

static
IsElementDefined(VisualStyleElement) : bool

Determines whether the specified visual style element is defined by the current visual style.

SetParameters(VisualStyleElement)

Sets this System.Windows.Forms.VisualStyles.VisualStyleRenderer to the visual style element represented by the specified System.Windows.Forms.VisualStyles.VisualStyleElement.

SetParameters(string, int, int)

Sets this System.Windows.Forms.VisualStyles.VisualStyleRenderer to the visual style element represented by the specified class, part, and state values.