VisualStyleElement.Spin.Down 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供 VisualStyleElement 向下箭頭每個狀態的物件,用於旋轉按鈕控制(亦稱為上下控制)。 無法繼承這個類別。
public: ref class VisualStyleElement::Spin::Down abstract sealed
public static class VisualStyleElement.Spin.Down
type VisualStyleElement.Spin.Down = class
Public Class VisualStyleElement.Spin.Down
- 繼承
-
VisualStyleElement.Spin.Down
範例
以下程式碼範例示範如何用屬性VisualStyleElement回傳Normal的 來建立 aVisualStyleRenderer。 要執行這個範例,請將它貼到 Windows 表單中。 處理表單的Paint事件,並從DrawVisualStyleElement_Spin_Down1事件處理方法呼叫該Paint方法,傳遞e為 PaintEventArgs。
public void DrawVisualStyleElement_Spin_Down1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Spin.Down.Normal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Spin.Down.Normal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Spin.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_Spin_Down1(ByVal e As PaintEventArgs)
If (VisualStyleRenderer.IsElementDefined( _
VisualStyleElement.Spin.Down.Normal)) Then
Dim renderer As New VisualStyleRenderer _
(VisualStyleElement.Spin.Down.Normal)
Dim rectangle1 As New Rectangle(10, 50, 50, 50)
renderer.DrawBackground(e.Graphics, rectangle1)
e.Graphics.DrawString("VisualStyleElement.Spin.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.Spin.Down 每個性質對於旋轉按鈕下指向箭頭的不同狀態,都會回傳 a VisualStyleElement 。
屬性
| 名稱 | Description |
|---|---|
| Disabled |
在禁用狀態下,會有一個視覺風格元素,代表向下指向旋轉按鈕的箭頭。 |
| Hot |
獲得一個視覺風格元素,代表熱狀態下向下指向旋轉按鈕的箭頭。 |
| Normal |
獲得一個視覺風格元素,代表正常狀態下向下指向旋轉按鈕的箭頭。 |
| Pressed |
獲得一個視覺風格元素,代表按下狀態下向下指向旋轉鍵箭頭的畫面。 |