VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal Eigenschaft

Definition

Ruft ein visuelles Stilelement ab, das den Hintergrund einer speziellen Gruppe von Elementen in der Explorer-Leiste 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; }
static member Normal : System.Windows.Forms.VisualStyles.VisualStyleElement
Public Shared ReadOnly Property Normal As VisualStyleElement

Eigenschaftswert

Ein VisualStyleElement, das den Hintergrund einer speziellen Gruppe von Elementen in der Explorer-Leiste darstellt.

Beispiele

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

public void DrawVisualStyleElementExplorerBarSpecialGroupBackground1(PaintEventArgs e)
{
    if (VisualStyleRenderer.IsElementDefined(
        VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal))
    {
        VisualStyleRenderer renderer =
             new VisualStyleRenderer(VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal);
        Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
        renderer.DrawBackground(e.Graphics, rectangle1);
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupBackground.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 DrawVisualStyleElementExplorerBarSpecialGroupBackground1(ByVal e As PaintEventArgs)
    If (VisualStyleRenderer.IsElementDefined( _
     VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal)) Then
        Dim renderer As New VisualStyleRenderer _
          (VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal)
        Dim rectangle1 As New Rectangle(10, 50, 50, 50)
        renderer.DrawBackground(e.Graphics, rectangle1)
        e.Graphics.DrawString("VisualStyleElement.ExplorerBar.SpecialGroupBackground.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 von der VisualStyleElementNormal -Eigenschaft zurückgegebene verwenden, um eine VisualStyleRendererzu erstellen.

Gilt für: