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

Dim returnValue As String returnValue = Me.GetEmptyDesignTimeHtml
他にビジュアルな表示が存在しないコントロールをデザイン時に表すために使用する HTML マークアップ。既定値は、コンポーネントの種類と ID を含んでいる四角形です。

GetEmptyDesignTimeHtml メソッドの既定の動作では、コンポーネント名を含んでいる文字列を返します。デザイン時 HTML マークアップが存在しない場合は、GetDesignTimeHtml メソッドの実装で GetEmptyDesignTimeHtml メソッドを呼び出す必要があります。

カスタム コントロール デザイナで GetDesignTimeHtml メソッドをオーバーライドする方法を次のコード例に示します。関連付けられているコントロールの Text プロパティが空の場合、GetDesignTimeHtml メソッドは GetEmptyDesignTimeHtml メソッドを呼び出します。それ以外の場合、GetDesignTimeHtml メソッドは Hyperlink コントロールを作成および表示します。
Public Overrides Function GetDesignTimeHtml() As String ' Component is the instance of the component or control that ' this designer object is associated with. This property is ' inherited from System.ComponentModel.ComponentDesigner. simpleControl = CType(Component, Simple) If simpleControl.Text.Length > 0 Then Dim sw As New StringWriter() Dim tw As New HtmlTextWriter(sw) Dim placeholderLink As New HyperLink() ' Put simpleControl.Text into the link's Text. placeholderLink.Text = simpleControl.Text placeholderLink.NavigateUrl = simpleControl.Text placeholderLink.RenderControl(tw) Return sw.ToString() Else Return GetEmptyDesignTimeHtml() End If End Function


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に収録されているすべての辞書からControlDesigner.GetEmptyDesignTimeHtml メソッドを検索する場合は、下記のリンクをクリックしてください。

- ControlDesigner.GetEmptyDesignTimeHtml メソッドのページへのリンク