VisualStyleElement.MenuBand.NewApplicationButton.Normal Eigenschaft

Definition

Ruft ein visuelles Stilelement ab, das die neue Anwendungsschaltfläche im normalen Zustand darstellt.

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

Eigenschaftswert

VisualStyleElement

Ein VisualStyleElement, das die neue Anwendungsschaltfläche im normalen Zustand darstellt.

Beispiele

Im folgenden Codebeispiel wird veranschaulicht, wie Eine VisualStyleRenderer mit der VisualStyleElement von der Normal Eigenschaft zurückgegebenen Eigenschaft erstellt wird. Um dieses Beispiel auszuführen, fügen Sie sie in ein Windows Formular ein. Behandeln Sie das Ereignis des FormularsPaint, und rufen Sie die DrawVisualStyleElementMenuBandNewApplicationButton1 Methode aus der Paint Ereignisbehandlungsmethode auf, die als PaintEventArgsübergeben e wird.

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

Hinweise

Sie können die VisualStyleElement von der Normal Eigenschaft zurückgegebene Eigenschaft verwenden, um eine VisualStyleRenderer.

Gilt für: