MenuItem.OnDrawItem(DrawItemEventArgs) 方法

定义

引发 DrawItem 事件。Raises the DrawItem event.

protected:
 virtual void OnDrawItem(System::Windows::Forms::DrawItemEventArgs ^ e);
protected virtual void OnDrawItem (System.Windows.Forms.DrawItemEventArgs e);
abstract member OnDrawItem : System.Windows.Forms.DrawItemEventArgs -> unit
override this.OnDrawItem : System.Windows.Forms.DrawItemEventArgs -> unit
Protected Overridable Sub OnDrawItem (e As DrawItemEventArgs)

参数

e
DrawItemEventArgs

包含事件数据的 DrawItemEventArgsA DrawItemEventArgs that contains the event data.

注解

引发事件时,将通过委托调用事件处理程序。Raising an event invokes the event handler through a delegate. 有关详细信息,请参阅处理和引发事件For more information, see Handling and Raising Events.

继承者说明

当在派生类中重写 OnDrawItem(DrawItemEventArgs) 时,请确保调用基类的 OnDrawItem(DrawItemEventArgs) 方法。When overriding OnDrawItem(DrawItemEventArgs) in a derived class, be sure to call the base class's OnDrawItem(DrawItemEventArgs) method.

适用于

另请参阅