RadioButtonRenderer Class

 

Provides methods used to render an option button control (also known as a radio button) with or without 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.RadioButtonRenderer

[<Sealed>]
type RadioButtonRenderer = class end

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticRenderMatchingApplicationState

Gets or sets a value indicating whether the renderer uses the application state to determine rendering style.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDrawParentBackground(Graphics, Rectangle, Control)

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

System_CAPS_pubmethodSystem_CAPS_staticDrawRadioButton(Graphics, Point, RadioButtonState)

Draws an option button control (also known as a radio button) in the specified state and location.

System_CAPS_pubmethodSystem_CAPS_staticDrawRadioButton(Graphics, Point, Rectangle, String, Font, Boolean, RadioButtonState)

Draws an option button control (also known as a radio button) in the specified state and location, with the specified text, and with an optional focus rectangle.

System_CAPS_pubmethodSystem_CAPS_staticDrawRadioButton(Graphics, Point, Rectangle, String, Font, Image, Rectangle, Boolean, RadioButtonState)

Draws an option button control (also known as a radio button) in the specified state and location, with the specified text and image, and with an optional focus rectangle.

System_CAPS_pubmethodSystem_CAPS_staticDrawRadioButton(Graphics, Point, Rectangle, String, Font, TextFormatFlags, Boolean, RadioButtonState)

Draws an option button control (also known as a radio button) in the specified state and location, with the specified text and text formatting, and with an optional focus rectangle.

System_CAPS_pubmethodSystem_CAPS_staticDrawRadioButton(Graphics, Point, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, RadioButtonState)

Draws an option button control (also known as a radio button) in the specified state and location; with the specified text, text formatting, and image; and with an optional focus rectangle.

System_CAPS_pubmethodEquals(Object)

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

System_CAPS_pubmethodSystem_CAPS_staticGetGlyphSize(Graphics, RadioButtonState)

Returns the size, in pixels, of the option button (also known as a radio button) glyph.

System_CAPS_pubmethodGetHashCode()

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

System_CAPS_pubmethodGetType()

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

System_CAPS_pubmethodSystem_CAPS_staticIsBackgroundPartiallyTransparent(RadioButtonState)

Indicates whether the background of the option button (also known as a radio button) has semitransparent or alpha-blended pieces.

System_CAPS_pubmethodToString()

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

The RadioButtonRenderer class provides a set of static methods that can be used to render an option button control. Rendering a control refers to drawing the user interface of a control. To draw an option button, use one of the DrawRadioButton methods. These methods provide a variety of options, such as drawing text or an image with the option button.

If visual styles are enabled in the operating system and visual styles are applied to the current application, DrawRadioButton will draw the option button with the current visual style. Otherwise, DrawRadioButton will draw the option button with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system.

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.Button.RadioButton 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 write a custom control that uses the DrawRadioButton method to draw an option button 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: