Glyph.Paint(PaintEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應