VisualStyleElement.Page.Down 类

定义

为 up-down 控件或数字显示框控件中的向下指示符的每个状态提供 VisualStyleElement 对象。 此类不能被继承。

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

示例

下面的代码示例演示如何使用 VisualStyleElement 属性返回的 Normal 创建 VisualStyleRenderer 。 若要运行此示例,请将其粘贴到 Windows 窗体中。 处理窗体的 Paint 事件,并从Paint事件处理方法调用 DrawVisualStyleElement_Page_Down1 方法,作为 ePaintEventArgs传递。

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

注解

类的每个属性 VisualStyleElement.Page.Down 获取一个 VisualStyleElement ,表示向上或自旋框控件中向下指示器的不同状态。

属性

Disabled

获取视觉样式元素,它表示 up-down 控件或数字显示框控件中的向下指示符处于禁用状态。

Hot

获取视觉样式元素,它表示 up-down 控件或数字显示框控件中的向下指示符处于热状态。

Normal

获取视觉样式元素,它表示 up-down 控件或数字显示框控件中的向下指示符处于正常状态。

Pressed

获取视觉样式元素,它表示 up-down 控件或数字显示框控件中的向下指示符处于按下状态。

适用于

另请参阅