VisualStyleElement.ExplorerBar.NormalGroupBackground Classe
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Fournit l’arrière-plan VisualStyleElement d’un groupe commun d’éléments dans la barre de l’Explorateur. Cette classe ne peut pas être héritée.
public: ref class VisualStyleElement::ExplorerBar::NormalGroupBackground abstract sealed
public static class VisualStyleElement.ExplorerBar.NormalGroupBackground
type VisualStyleElement.ExplorerBar.NormalGroupBackground = class
Public Class VisualStyleElement.ExplorerBar.NormalGroupBackground
- Héritage
-
VisualStyleElement.ExplorerBar.NormalGroupBackground
Exemples
L’exemple de code suivant montre comment créer un VisualStyleRenderer avec la VisualStyleElementNormal propriété retournée. Pour exécuter cet exemple, collez-le dans un Windows Form. Gérez l’événement du Paint formulaire et appelez la DrawVisualStyleElementExplorerBarNormalGroupBackground1 méthode à partir de la Paint méthode de gestion des événements, en passant e en tant que PaintEventArgs.
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
Remarques
La Normal propriété de la VisualStyleElement.ExplorerBar.NormalGroupBackground classe obtient un VisualStyleElement qui représente l’arrière-plan d’un groupe commun d’éléments dans la barre de l’Explorateur, tel que le groupe Tâches de fichiers et de dossiers dans l’Explorateur Windows.
Propriétés
| Nom | Description |
|---|---|
| Normal |
Obtient un élément de style visuel qui représente l’arrière-plan d’un groupe commun d’éléments dans la barre de l’Explorateur. |