Muokkaa

Jaa


Glyph.Paint(PaintEventArgs) Method

Definition

Provides paint logic.

public:
 abstract void Paint(System::Windows::Forms::PaintEventArgs ^ pe);
public abstract void Paint (System.Windows.Forms.PaintEventArgs pe);
abstract member Paint : System.Windows.Forms.PaintEventArgs -> unit
Public MustOverride Sub Paint (pe As PaintEventArgs)

Parameters

pe
PaintEventArgs

A PaintEventArgs that contains the event data.

Examples

The following example demonstrates how to override the Paint to draw a glyph. This code example is part of a larger example provided for the BehaviorService class.

public:
    virtual void Paint(PaintEventArgs^ pe) override
    {
        // Draw our glyph.  Our's is simple:  a blue ellipse.
        pe->Graphics->FillEllipse(Brushes::Blue, Bounds);
    }
public override void Paint(PaintEventArgs pe)
{
    // Draw our glyph. It is simply a blue ellipse.
    pe.Graphics.FillEllipse(Brushes.Blue, Bounds);
}
Public Overrides Sub Paint(ByVal pe As PaintEventArgs)
    ' Draw our glyph.  It is simply a blue ellipse.
    pe.Graphics.FillEllipse(Brushes.Blue, Bounds)

End Sub

Remarks

The Paint method is an abstract method that forces Glyph implementations to provide paint logic. The pe parameter contains the Graphics related to the adorner window of the BehaviorService.

Applies to

See also