VisualStyleElement.Taskbar.SizingBarLeft Třída

Definice

VisualStyleElement Poskytuje pro panel velikosti hlavního panelu, který je ukotvený na levé straně obrazovky. Tato třída se nemůže dědit.

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

Příklady

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

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

Vlastnost NormalVisualStyleElement.Taskbar.SizingBarLeft třídy vrátí VisualStyleElement hodnotu , která představuje panel velikosti hlavního panelu, který je ukotven na levé straně obrazovky.

Vlastnosti

Normal

Získá prvek vizuálního stylu, který představuje pruh velikosti pro hlavní panel, který je ukotven na levé straně obrazovky.

Platí pro

Viz také