Freigeben über


VisualStyleElement.ExplorerBar.NormalGroupBackground Klasse

Definition

Stellt einen VisualStyleElement Hintergrund einer allgemeinen Gruppe von Elementen in der Explorer-Leiste bereit. Diese Klasse kann nicht vererbt werden.

public: ref class VisualStyleElement::ExplorerBar::NormalGroupBackground abstract sealed
public static class VisualStyleElement.ExplorerBar.NormalGroupBackground
type VisualStyleElement.ExplorerBar.NormalGroupBackground = class
Public Class VisualStyleElement.ExplorerBar.NormalGroupBackground
Vererbung
VisualStyleElement.ExplorerBar.NormalGroupBackground

Beispiele

Im folgenden Codebeispiel wird veranschaulicht, wie sie eine VisualStyleRenderer mit der VisualStyleElement von der Normal Eigenschaft zurückgegebenen Eigenschaft erstellen. Zum Ausführen dieses Beispiels fügen Sie es in ein Windows Form-Formular ein. Behandeln Sie das Ereignis des Formulars Paint , und rufen Sie die DrawVisualStyleElementExplorerBarNormalGroupBackground1 Methode aus der Paint Ereignisbehandlungsmethode auf und übergeben als ePaintEventArgs.

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

Die Normal Eigenschaft der VisualStyleElement.ExplorerBar.NormalGroupBackground Klasse ruft einen VisualStyleElement , der den Hintergrund einer allgemeinen Gruppe von Elementen in der Explorer-Leiste darstellt, z. B. die Gruppe "Datei- und Ordneraufgaben " im Windows-Explorer.

Eigenschaften

Name Beschreibung
Normal

Ruft ein visuelles Stilelement ab, das den Hintergrund einer allgemeinen Gruppe von Elementen in der Explorer-Leiste darstellt.

Gilt für:

Weitere Informationen