VisualStyleElement.ExplorerBar.SpecialGroupBackground.Normal Propriété
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.
Obtient un élément de style visuel qui représente l’arrière-plan d’un groupe spécial d’éléments dans la barre de l’Explorateur.
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
Valeur de propriété
Qui VisualStyleElement représente l’arrière-plan d’un groupe spécial d’éléments dans la barre de l’Explorateur.
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 DrawVisualStyleElementExplorerBarSpecialGroupBackground1 méthode à partir de la Paint méthode de gestion des événements, en passant e en tant que 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
Remarques
Vous pouvez utiliser le VisualStyleElement retour par la Normal propriété pour créer un VisualStyleRenderer.