VisualStyleElement.ToolTip.Close Osztály

Definíció

Objektumokat biztosít VisualStyleElement egy elemleírás Bezárás gombjának minden állapotához. Ez az osztály nem örökölhető.

public: ref class VisualStyleElement::ToolTip::Close abstract sealed
public static class VisualStyleElement.ToolTip.Close
type VisualStyleElement.ToolTip.Close = class
Public Class VisualStyleElement.ToolTip.Close
Öröklődés
VisualStyleElement.ToolTip.Close

Példák

Az alábbi példakód bemutatja, hogyan hozhat létre egy VisualStyleRenderer tulajdonság által visszaadott VisualStyleElement kóddalHot. A példa futtatásához illessze be egy Windows űrlapba. Kezelje az űrlap eseményét Paint , és hívja meg a DrawVisualStyleElementToolTipClose2 metódust az Paint eseménykezelési metódusból, és e adja át a következőt PaintEventArgs: .

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

Megjegyzések

Az osztály minden tulajdonsága VisualStyleElement.ToolTip.Close egy elemleírás VisualStyleElement gombjának egy másik állapotát kapja meg.

Tulajdonságok

Name Description
Hot

Beolvas egy vizuális stíluselemet, amely az Elemleírás bezárás gombját jelöli a gyakori elérésű állapotban.

Normal

Beolvas egy vizuális stíluselemet, amely az Elemleírás bezárás gombját jelöli normál állapotban.

Pressed

Lekéri a lenyomott állapotban lévő Elemleírás bezárás gombját jelképező vizuális stíluselemet.

A következőre érvényes:

Lásd még