VisualStyleElement.Button.RadioButton Osztály

Definíció

Objektumokat biztosít VisualStyleElement a választógomb vezérlőelem különböző állapotainak. Ez az osztály nem örökölhető.

public: ref class VisualStyleElement::Button::RadioButton abstract sealed
public static class VisualStyleElement.Button.RadioButton
type VisualStyleElement.Button.RadioButton = class
Public Class VisualStyleElement.Button.RadioButton
Öröklődés
VisualStyleElement.Button.RadioButton

Példák

Az alábbi példakód bemutatja, hogyan hozhat létre egy VisualStyleRenderer tulajdonság által visszaadott VisualStyleElement kóddalVisualStyleElement.Button.RadioButton. A példa futtatásához illessze be egy Windows űrlapba. Kezelje az űrlap eseményét Paint , és hívja meg a DrawVisualStyleElement_Button_RadioButton1 metódust az Paint eseménykezelési metódusból, és e adja át a következőt PaintEventArgs: .

public void DrawVisualStyleElement_Button_RadioButton1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.Button.RadioButton.UncheckedNormal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.Button.RadioButton.UncheckedNormal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.UncheckedNormal",
             this.Font, Brushes.Black, new Point(10, 10));
    }
    else
        e.Graphics.DrawString("This element is not defined in the current visual style.",
             this.Font, Brushes.Black, new Point(10, 10));
}
Public Sub DrawVisualStyleElement_Button_RadioButton1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.Button.RadioButton.UncheckedNormal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.Button.RadioButton.UncheckedNormal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.Button.RadioButton.UncheckedNormal", _
          Me.Font, Brushes.Black, New Point(10, 10))
    Else
        e.Graphics.DrawString("This element is not defined in the current visual style.", _
          Me.Font, Brushes.Black, New Point(10, 10))
    End If
End Sub

Megjegyzések

Az osztály minden tulajdonsága VisualStyleElement.Button.RadioButton a választógomb vezérlőelem egy másik állapotát adja vissza VisualStyleElement .

Tulajdonságok

Name Description
CheckedDisabled

Beolvas egy vizuális stíluselemet, amely egy letiltott választógombot jelöl a bejelölt állapotban.

CheckedHot

Beolvas egy vizuális stíluselemet, amely egy gyakori frekvenciás választógombot jelöl a bejelölt állapotban.

CheckedNormal

Beolvas egy vizuális stíluselemet, amely egy normál választógombot jelöl a bejelölt állapotban.

CheckedPressed

Beolvas egy vizuális stíluselemet, amely bejelölt állapotban lévő lenyomott választógombot jelöl.

UncheckedDisabled

Lekéri a nem bejelölt állapotban lévő letiltott választógombot jelképező vizuális stíluselemet.

UncheckedHot

Lekéri a nem bejelölt állapotban lévő gyakori frekvenciás választógombot jelképező vizuális stíluselemet.

UncheckedNormal

Beolvas egy vizuális stíluselemet, amely a normál választógombot jelöli bejelöletlen állapotban.

UncheckedPressed

Beolvas egy olyan vizuális stíluselemet, amely bejelöletlen állapotban lévő lenyomott választógombot jelöl.

A következőre érvényes:

Lásd még