Sdílet prostřednictvím


VisualStyleElement.ExplorerBar.HeaderPin Třída

Definice

Poskytuje VisualStyleElement objekty pro každý stav tlačítka Automatické skrytí (který se zobrazuje jako připnutí) panelu Průzkumníka. Tuto třídu nelze zdědit.

public: ref class VisualStyleElement::ExplorerBar::HeaderPin abstract sealed
public static class VisualStyleElement.ExplorerBar.HeaderPin
type VisualStyleElement.ExplorerBar.HeaderPin = class
Public Class VisualStyleElement.ExplorerBar.HeaderPin
Dědičnost
VisualStyleElement.ExplorerBar.HeaderPin

Příklady

Následující příklad kódu ukazuje, jak vytvořit VisualStyleRenderer s VisualStyleElement vrácenou Normal vlastností. Pokud chcete tento příklad spustit, vložte ho do formuláře Windows. Zpracujte událost formuláře Paint a volejte metodu DrawVisualStyleElementExplorerBarHeaderPin1Paint z metody zpracování událostí a předejte e ji jako PaintEventArgs.

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

Poznámky

Každá vlastnost VisualStyleElement.ExplorerBar.HeaderPin třídy vrátí VisualStyleElement pro jiný stav tlačítka Automatické skrytí panelu Průzkumníka.

Vlastnosti

Name Description
Hot

Získá vizuální styl prvek, který představuje tlačítko automatického skrytí (který se zobrazí jako připínáčku) v horkém stavu.

Normal

Získá vizuální styl prvek, který představuje tlačítko Automatické skrytí (který je zobrazen jako připnutí) v normálním stavu.

Pressed

Získá vizuální styl prvek, který představuje tlačítko automatického skrytí (který se zobrazí jako připnutí) ve stisknutém stavu.

SelectedHot

Získá prvek vizuálního stylu, který představuje vybrané tlačítko automatického skrytí (které se zobrazí jako připínáčku) v horkém stavu.

SelectedNormal

Získá vizuální styl prvek, který představuje vybrané tlačítko automatického skrytí (který se zobrazí jako připínáčku) v normálním stavu.

SelectedPressed

Získá vizuální styl prvek, který představuje vybrané tlačítko automatického skrytí (který se zobrazí jako připnutí) ve stisknutém stavu.

Platí pro

Viz také