MenuDesigner.GetEmptyDesignTimeHtml メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
マークアップが使用できない場合に、デザイン時に関連付けられたコントロールのプレースホルダーをレンダリングするマークアップを取得します。
protected:
override System::String ^ GetEmptyDesignTimeHtml();
protected override string GetEmptyDesignTimeHtml();
override this.GetEmptyDesignTimeHtml : unit -> string
Protected Overrides Function GetEmptyDesignTimeHtml () As String
返品
デザイン サーフェイス上のプレースホルダーにレンダリングされるマークアップ テキストを含む文字列。
例
次のコード例は、GetEmptyDesignTimeHtml クラスから継承されたクラスのMenuDesigner メソッドをオーバーライドする方法を示しています。 オーバーライドされたメソッドは、デザイン時に Menu クラスから派生したコントロールの外観を変更します。 この例では、関連付けられたコントロールに対してメニュー項目が定義されていないことを示すメッセージを含むプレースホルダーのマークアップを生成します。
// Generate the design-time markup for the control
// when the template is empty.
protected override string GetEmptyDesignTimeHtml()
{
string noElements = "Contains no menu items.";
return CreatePlaceHolderDesignTimeHtml(noElements);
} // GetEmptyDesignTimeHtml
' Generate the design-time markup for the control
' when the template is empty.
Protected Overrides Function GetEmptyDesignTimeHtml() As String
Dim noElements As String = "Contains no menu items."
Return CreatePlaceHolderDesignTimeHtml(noElements)
End Function ' GetEmptyDesignTimeHtml
注釈
GetEmptyDesignTimeHtml メソッドは、Menu コントロール名と、コレクション エディターを使用して項目を追加するように指示するメッセージを指定するプレースホルダーのマークアップを生成します。