VisualStyleElement.Spin.Up 類別

定義

針對微調按鈕控制項 (也稱為上下按鈕控制項) 的上指 (Upward-Pointing) 箭號之每個狀態提供 VisualStyleElement 物件。 此類別無法獲得繼承。

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

範例

下列程式碼範例示範如何使用 屬性傳回的 Normal 建立 VisualStyleRendererVisualStyleElement 。 若要執行此範例,請將它貼到 Windows Form 中。 處理表單的事件 Paint ,並從事件處理方法呼叫 DrawVisualStyleElement_Spin_Up1 方法 Paint ,並傳遞 ePaintEventArgs

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

備註

類別 VisualStyleElement.Spin.Up 的每個屬性都會 VisualStyleElement 針對微調按鈕的上指箭號不同狀態傳回 。

屬性

Disabled

取得視覺化樣式項目,表示處於停用狀態的上指微調按鈕箭號。

Hot

取得視覺化樣式項目,表示處於作用中狀態的上指微調按鈕箭號。

Normal

取得視覺化樣式項目,表示處於正常狀態的上指微調按鈕箭號。

Pressed

取得視覺化樣式項目,表示處於已按下狀態的上指微調按鈕箭號。

適用於

另請參閱