ElementHost.OnPaint(PaintEventArgs) 方法

定義

引發 Paint 事件。Raises the Paint event.

protected:
 override void OnPaint(System::Windows::Forms::PaintEventArgs ^ e);
[System.ComponentModel.Browsable(false)]
protected override void OnPaint (System.Windows.Forms.PaintEventArgs e);
[<System.ComponentModel.Browsable(false)>]
override this.OnPaint : System.Windows.Forms.PaintEventArgs -> unit
Protected Overrides Sub OnPaint (e As PaintEventArgs)

參數

e
PaintEventArgs

PaintEventArgs,其中包含事件資料。A PaintEventArgs that contains the event data.

屬性

備註

ElementHost方法的執行會 OnPaint 轉送到基類的實作為。The ElementHost implementation of the OnPaint method forwards to the base class implementation.

給繼承者的注意事項

不要覆寫這個方法的執行 OnPaint(PaintEventArgs)Do not override this implementation of the OnPaint(PaintEventArgs) method. ElementHost控制項會管理其裝載元素的繪製,而覆寫 OnPaint(PaintEventArgs) 會導致無法預期的結果。The ElementHost control manages the painting of its hosted element, and overriding OnPaint(PaintEventArgs) will cause unpredictable results.

適用於

另請參閱