Glyph.Paint(PaintEventArgs) メソッド

定義

描画ロジックを提供します。

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)

パラメーター

pe
PaintEventArgs

イベント データを格納している PaintEventArgs

次の例では、グリフを描画するためにオーバーライドする Paint 方法を示します。 このコード例は、BehaviorService クラスのために提供されている大規模な例の一部です。

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

注釈

この Paint メソッドは、実装に abstract ペイント ロジックの提供を強制 Glyph するメソッドです。 このpeパラメーターには、.Graphics BehaviorService

適用対象

こちらもご覧ください