共用方式為


VisualStyleElement.Page.Up 類別

定義

提供 VisualStyleElement 上下或旋轉盒控制的頁面向上指示器中每個狀態的物件。 無法繼承這個類別。

public: ref class VisualStyleElement::Page::Up abstract sealed
public static class VisualStyleElement.Page.Up
type VisualStyleElement.Page.Up = class
Public Class VisualStyleElement.Page.Up
繼承
VisualStyleElement.Page.Up

範例

以下程式碼範例示範如何用屬性VisualStyleElement回傳Normal的 來建立 aVisualStyleRenderer。 要執行這個範例,請將它貼到 Windows 表單中。 處理表單的Paint事件,並從DrawVisualStyleElement_Page_Up1事件處理方法呼叫該Paint方法,傳遞ePaintEventArgs

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

備註

類別的 VisualStyleElement.Page.Up 每個屬性會回傳 a VisualStyleElement ,表示上下翻頁指示器或旋轉盒控制的不同狀態。

屬性

名稱 Description
Disabled

取得一個視覺樣式元素,代表在停用狀態下上下或旋轉盒控制的頁面向上指示。

Hot

獲得一個視覺樣式元素,代表熱狀態下上下或旋轉盒控制的翻頁指示。

Normal

獲得一個視覺樣式元素,代表正常狀態下上下或旋轉框控制的翻頁指示。

Pressed

獲得一個視覺樣式元素,代表按下狀態下上下或旋轉盒控制的翻頁指示。

適用於

另請參閱