VisualStyleElement.Window.FrameBottom.Inactive Vlastnost

Definice

Získá vizuální styl prvek, který představuje dolní okraj neaktivního okna.

public:
 static property System::Windows::Forms::VisualStyles::VisualStyleElement ^ Inactive { System::Windows::Forms::VisualStyles::VisualStyleElement ^ get(); };
public static System.Windows.Forms.VisualStyles.VisualStyleElement Inactive { get; }
static member Inactive : System.Windows.Forms.VisualStyles.VisualStyleElement
Public Shared ReadOnly Property Inactive As VisualStyleElement

Hodnota vlastnosti

A VisualStyleElement , který představuje dolní okraj neaktivního okna.

Příklady

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

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

K vytvoření můžete použít VisualStyleElement objekt vrácený InactiveVisualStyleRenderervlastností .

Platí pro