MenuDesigner.GetErrorDesignTimeHtml メソッド
アセンブリ: System.Design (system.design.dll 内)

Dim e As Exception Dim returnValue As String returnValue = Me.GetErrorDesignTimeHtml(e)
戻り値
エラーが発生した後で、関連付けられた Menu のデザイン時表示に使用するマークアップを含んだ文字列。

GetErrorDesignTimeHtml メソッドは、デザイン時の Menu コントロールに、型名、コントロール名、およびエラーを説明するメッセージを含んだプレースホルダとしてエラーを表示するマークアップを生成します。

MenuDesigner クラスから継承したクラスの GetErrorDesignTimeHtml メソッドをオーバーライドする方法を次のコード例に示します。オーバーライドされたメソッドは、デザイン時に Menu クラスから派生したコントロールの外観を変更します。この例では、赤の太字で表示されるエラー メッセージを含んだプレースホルダのマークアップを生成しています。
' Generate the design-time markup for the control when an error occurs. Protected Overrides Function GetErrorDesignTimeHtml( _ ByVal ex As Exception) As String ' Write the error message text in red, bold. Dim errorRendering As String = _ "<span style=""font-weight:bold; color:Red; "">" & _ ex.Message & "</span>" Return CreatePlaceHolderDesignTimeHtml(errorRendering) End Function ' GetErrorDesignTimeHtml
// Generate the design-time markup for the control when an error occurs. protected override string GetErrorDesignTimeHtml(Exception ex) { // Write the error message text in red, bold. string errorRendering = "<span style=\"font-weight:bold; color:Red; \">" + ex.Message + "</span>"; return CreatePlaceHolderDesignTimeHtml(errorRendering); } // GetErrorDesignTimeHtml


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からMenuDesigner.GetErrorDesignTimeHtml メソッドを検索する場合は、下記のリンクをクリックしてください。

- MenuDesigner.GetErrorDesignTimeHtml メソッドのページへのリンク