ToolStripRenderer.DrawMenuItemBackground(ToolStripItemRenderEventArgs) ToolStripRenderer.DrawMenuItemBackground(ToolStripItemRenderEventArgs) ToolStripRenderer.DrawMenuItemBackground(ToolStripItemRenderEventArgs) ToolStripRenderer.DrawMenuItemBackground(ToolStripItemRenderEventArgs) Method

定義

繪製 ToolStripMenuItem 的背景。Draws the background for a ToolStripMenuItem.

public:
 void DrawMenuItemBackground(System::Windows::Forms::ToolStripItemRenderEventArgs ^ e);
public void DrawMenuItemBackground (System.Windows.Forms.ToolStripItemRenderEventArgs e);
member this.DrawMenuItemBackground : System.Windows.Forms.ToolStripItemRenderEventArgs -> unit
Public Sub DrawMenuItemBackground (e As ToolStripItemRenderEventArgs)

參數

e
ToolStripItemRenderEventArgs ToolStripItemRenderEventArgs ToolStripItemRenderEventArgs ToolStripItemRenderEventArgs

ToolStripItemRenderEventArgs,其中包含要繪製功能表項目背景的資料。A ToolStripItemRenderEventArgs that contains the data to draw the background for the menu item.

備註

方法會提供的背景ToolStripMenuItem呈現程式碼的進入點。 DrawMenuItemBackgroundThe DrawMenuItemBackground method provides the entry point to the rendering code for the background of a ToolStripMenuItem. ToolStripMenuItem當覆ToolStripMenuItem寫方法時, 使用這個方法來繪製的背景, 或強制在自訂ToolStripRenderer中繪製的背景。 ToolStripMenuItem.OnPaintUse this method to draw the background of a ToolStripMenuItem when overriding the ToolStripMenuItem.OnPaint method, or to force the background of a ToolStripMenuItem to be drawn in a custom ToolStripRenderer. 若要變更呈現背景ToolStripMenuItem的方式, 請覆寫衍生自之ToolStripRenderer類別中的OnRenderMenuItemBackground方法。To change the way the background for a ToolStripMenuItem is rendered, override the OnRenderMenuItemBackground method in a class derived from ToolStripRenderer.

適用於