ControlBuilder.InDesigner プロパティ
アセンブリ: System.Web (system.web.dll 内)


NeedsTagInnerText メソッドが呼び出される時に InDesigner プロパティを使用する例を次に示します。コントロールにこのビルダがアタッチされている場合、NeedsTagInnerText メソッドは、そのコントロールへの現在のアクセスが、デザイナを通じた (デザイン時の) アクセスであるかどうかを確認します。NeedsTagInnerText メソッドを呼び出すと、InDesigner プロパティの値が返され、その後 SetTagInnerText メソッドが呼び出されます。InDesigner プロパティが false に設定されている場合は、Exception がスローされます。それ以外の場合は、SetTagInnerText の呼び出しにより、コントロールの内部テキストが返されます。
<AspNetHostingPermission(SecurityAction.Demand, _ Level:=AspNetHostingPermissionLevel.Minimal)> _ Public NotInheritable Class MyControlControlBuilder Inherits ControlBuilder Private _innerText As String Overrides Public Function NeedsTagInnerText() As Boolean Return InDesigner End Function Overrides Public Sub SetTagInnerText(ByVal text As String) If InDesigner = False Throw New System.Exception("The control is not in design mode.") Else _innerText = text End If End Sub End Class
[AspNetHostingPermission(SecurityAction.Demand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class MyControlControlBuilder : ControlBuilder { private string _innerText; public override bool NeedsTagInnerText() { return InDesigner; } public override void SetTagInnerText(string text) { if (!InDesigner) throw new Exception("The control is not in design mode."); else _innerText = text; } }

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に収録されているすべての辞書からControlBuilder.InDesigner プロパティを検索する場合は、下記のリンクをクリックしてください。

- ControlBuilder.InDesigner プロパティのページへのリンク