Udostępnij przez


SystemPens.GrayText Właściwość

Definicja

Pen Pobiera kolor wygaszonego tekstu.

public:
 static property System::Drawing::Pen ^ GrayText { System::Drawing::Pen ^ get(); };
public static System.Drawing.Pen GrayText { get; }
static member GrayText : System.Drawing.Pen
Public Shared ReadOnly Property GrayText As Pen

Wartość właściwości

Pen

Kolor Pen wygaszonego tekstu.

Przykłady

W poniższym przykładzie kodu pokazano, jak używać GrayText właściwości. Aby uruchomić ten przykład, wklej go do formularza systemu Windows. Obsłuż zdarzenie formularza Paint i wywołaj DrawWithGrayTextPen metodę z Paint metody obsługi zdarzeń, przekazując e jako PaintEventArgs.

private void DrawWithGrayTextPen(PaintEventArgs e)
{
    Rectangle rectangle1 = new Rectangle(10, 10, 100, 100);
    e.Graphics.DrawRectangle(SystemPens.GrayText, rectangle1);
}
Private Sub DrawWithGrayTextPen(ByVal e As PaintEventArgs) 
    Dim rectangle1 As New Rectangle(10, 10, 100, 100)
    e.Graphics.DrawRectangle(SystemPens.GrayText, rectangle1)

End Sub

Uwagi

Elementy na liście, które są wyłączone, są wyświetlane w wygaszony tekst.

Dotyczy