VisualStyleElement.Spin.Up Klass

Definition

Innehåller VisualStyleElement objekt för varje tillstånd för uppåtriktad pil för en rotationsknappskontroll (kallas även för en upp-ned-kontroll). Det går inte att ärva den här klassen.

public: ref class VisualStyleElement::Spin::Up abstract sealed
public static class VisualStyleElement.Spin.Up
type VisualStyleElement.Spin.Up = class
Public Class VisualStyleElement.Spin.Up
Arv
VisualStyleElement.Spin.Up

Exempel

I följande kodexempel visas hur du skapar en VisualStyleRenderer med den VisualStyleElement som returneras av Normal egenskapen. Om du vill köra det här exemplet klistrar du in det i ett Windows formulär. Hantera formulärets Paint händelse och anropa DrawVisualStyleElement_Spin_Up1 metoden från Paint händelsehanteringsmetoden och skicka e som PaintEventArgs.

public void DrawVisualStyleElement_Spin_Up1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.Spin.Up.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.Spin.Up.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.Spin.Up.Normal",
             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_Spin_Up1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.Spin.Up.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.Spin.Up.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.Spin.Up.Normal", _
          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

Kommentarer

Varje egenskap i VisualStyleElement.Spin.Up klassen returnerar en VisualStyleElement för ett annat tillstånd för uppåtriktad pil för en rotationsknapp.

Egenskaper

Name Description
Disabled

Hämtar ett visuellt formatelement som representerar en uppåtriktad rotationsknapppil i inaktiverat tillstånd.

Hot

Hämtar ett visuellt formatelement som representerar en uppåtriktad rotationsknapppil i hett tillstånd.

Normal

Hämtar ett visuellt formatelement som representerar en uppåtriktad rotationsknapppil i normalt tillstånd.

Pressed

Hämtar ett visuellt formatelement som representerar en uppåtriktad rotationsknapppil i nedtryckt tillstånd.

Gäller för

Se även