VisualStyleElement.Page.Down Klass

Definition

Innehåller VisualStyleElement objekt för varje tillstånd för en nedindikator i en upp- eller spin box-kontroll. Det går inte att ärva den här klassen.

public: ref class VisualStyleElement::Page::Down abstract sealed
public static class VisualStyleElement.Page.Down
type VisualStyleElement.Page.Down = class
Public Class VisualStyleElement.Page.Down
Arv
VisualStyleElement.Page.Down

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_Page_Down1 metoden från Paint händelsehanteringsmetoden och skicka e som PaintEventArgs.

public void DrawVisualStyleElement_Page_Down1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.Page.Down.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.Page.Down.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.Page.Down.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_Page_Down1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.Page.Down.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.Page.Down.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.Page.Down.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.Page.Down klassen får en VisualStyleElement för olika tillstånd för en nedindikator i en upp- eller spin box-kontroll.

Egenskaper

Name Description
Disabled

Hämtar ett visuellt formatelement som representerar det inaktiverade tillståndet för nedindikatorn i en upp- eller spinnbox-kontroll.

Hot

Hämtar ett element i visuellt format som representerar en nedindikator för en upp- eller rotationsrutekontroll i hett tillstånd.

Normal

Hämtar ett visuellt formatelement som representerar nedindikatorn för en upp- eller spin box-kontroll i normalt tillstånd.

Pressed

Hämtar ett visuellt formatelement som representerar nedindikatorn för en upp- eller rotationsruta i nedtryckt tillstånd.

Gäller för

Se även