共用方式為


VisualStyleElement.Window.FrameLeftSizingTemplate.Normal 屬性

定義

會取得一個視覺風格元素,代表視窗左側邊框的尺寸模板。

public:
 static property System::Windows::Forms::VisualStyles::VisualStyleElement ^ Normal { System::Windows::Forms::VisualStyles::VisualStyleElement ^ get(); };
public static System.Windows.Forms.VisualStyles.VisualStyleElement Normal { get; }
static member Normal : System.Windows.Forms.VisualStyles.VisualStyleElement
Public Shared ReadOnly Property Normal As VisualStyleElement

屬性值

A VisualStyleElement 代表視窗左側邊界的尺寸模板。

範例

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

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

備註

你可以利用屬性回傳NormalVisualStyleElement s 來建立一個 VisualStyleRenderer

適用於