ControlDesigner クラス
アセンブリ: System.Design (system.design.dll 内)


ControlDesigner クラスは、Visual Studio 2005 などのデザイン ホストで、デザイン時に Web サーバー コントロールをサポートするために継承および拡張できる基本コントロール デザイナ クラスを提供します。
デザイン時の表示を処理するオブジェクト モデルは、以前のバージョンに比べて強化されており、簡略化されたオブジェクト モデルにアクセスできるようにするために、次の新しい基本クラスが追加されています。
オートフォーマットさまざまなオートフォーマットおよび定義済み書式を作成して、ページ開発者が複雑なスタイル変更をカスタムの Web サーバー コントロールに適用する場合の処理を簡単にできます。たとえば、ControlDesigner クラスから派生した TableDesigner コントロールには、選択できる多数のオートフォーマットが用意されています。カスタム コントロールでオートフォーマットを実装および提供するには、次の機能を使用します。
アクション リストは、コントロールを使用するページ開発者が Visual Studio 2005 などのデザイン時ユーザー インターフェイス (UI: User Interface) で実行できる、重要なタスクまたは一般的に使用されるタスクのメニューです。たとえば、コントロールのデザイン時ビューに、利用できるタスクのメニューを用意できます。これには、コントロールの書式を自動設定するタスクも含まれます。アクション リストの機能を習得するには、まず次の機能を使用してみてください。
領域は、Web サーバー コントロールのデザイン時ビューの編集可能な領域です。この機能により、デザイン時に、テンプレート コンテンツ、内部コントロール、およびプロパティを WYSIWYG 形式で編集できます。コントロール デザイナによって領域内にコントロールが作成されるようにすることも、ツールボックスを使用してコントロールを領域内にドラッグ アンド ドロップすることもできます。領域は、次の機能で管理します。
GridView コントロールなどのテンプレート コントロールをデザイン時に編集するための UI の作成モデルは、以前のバージョンに比べて大幅に強化されています。コントロールのさまざまなパーツのテンプレートを含む複雑なカスタム コントロールを作成できます。また、カスタム コントロールのデザイナにより、次の機能を使用して、テンプレートを変更するページ開発者を支援できます。

ControlDesigner クラスから派生した単純なデザイナ クラスを作成する方法のコード例を次に示します。このコントロール デザイナは、カスタム TextControl クラスをサポートし、デザイン時にコントロールのテキスト サイズを変更するコマンドを提供します。コントロール デザイナは、TextControl クラスの DesignerAttribute オブジェクト宣言でコントロール デザイナを指定することにより、コントロールと関連付けられます。コントロール デザイナから HTML マークアップへのプロパティの変更を永続化するためのキーは、カスタム ActionList クラスの ToggleTextSize メソッドにあります。
この例を実行するには、System.Design.dll アセンブリへの参照を追加し、コードをコンパイルします。
Imports Microsoft.VisualBasic Imports System.Web.UI Imports System.Web.UI.Design Imports System.Web.UI.WebControls Imports System.ComponentModel Imports System.ComponentModel.Design Namespace ASPNet.Design.Samples.VB ' Simple text Web control renders a text string. ' This control is associated with the TextSizeWebControlDesigner. <DesignerAttribute(GetType(TextSizeWebControlDesigner)), _ ToolboxData("<{0}:TextControl runat='server'></{0}:TextControl>")> _ Public Class TextControl Inherits Label Private _largeText As Boolean = True ' Constructor Public Sub New() Text = "Test Phrase" SetSize() End Sub ' Determines whether the text is large or small <Bindable(True), Category("Appearance"), DefaultValue(True)> _ Public Property LargeText() As Boolean Get Return _largeText End Get Set(ByVal value As Boolean) _largeText = value SetSize() End Set End Property ' Applies the LargeText property to the control Private Sub SetSize() If LargeText Then Me.Font.Size = FontUnit.XLarge Else Me.Font.Size = FontUnit.Small End If End Sub End Class ' This control designer offers DesignerActionList commands ' that can alter the design time html of the associated control. Public Class TextSizeWebControlDesigner Inherits ControlDesigner Private _actionLists As DesignerActionListCollection ' Do not allow direct resizing of the control Public Overrides ReadOnly Property AllowResize() As Boolean Get Return False End Get End Property ' Return a custom ActionList collection Public Overrides ReadOnly Property ActionLists() As System.ComponentModel.Design.DesignerActionListCollection Get If IsNothing(_actionLists) Then _actionLists = New DesignerActionListCollection() _actionLists.AddRange(MyBase.ActionLists) ' Add a custom DesignerActionList _actionLists.Add(New ActionList(Me)) End If Return _actionLists End Get End Property ' Create a custom class of DesignerActionList Public Class ActionList Inherits DesignerActionList Private _parent As TextSizeWebControlDesigner Private _items As DesignerActionItemCollection ' Constructor Public Sub New(ByRef parent As TextSizeWebControlDesigner) MyBase.New(parent.Component) _parent = parent End Sub ' Create the ActionItem collection and add one command Public Overrides Function GetSortedActionItems() As DesignerActionItemCollection If IsNothing(_items) Then _items = New DesignerActionItemCollection() _items.Add(New DesignerActionMethodItem(Me, "ToggleLargeText", "Toggle Text Size", True)) End If Return _items End Function ' ActionList command to change the text size Private Sub ToggleLargeText() ' Get a reference to the parent designer's associated control Dim ctl As TextControl = CType(_parent.Component, TextControl) ' Get a reference to the control's LargeText property Dim propDesc As PropertyDescriptor = TypeDescriptor.GetProperties(ctl)("LargeText") ' Get the current value of the property Dim v As Boolean = CType(propDesc.GetValue(ctl), Boolean) ' Toggle the property value propDesc.SetValue(ctl, (Not v)) End Sub End Class End Class End Namespace <br /><span space="preserve">...</span><br /><%@ Page Language="VB" %> <%@ Register TagPrefix="aspSample" Namespace="ASPNet.Design.Samples.VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <aspSample:TextControl ID=TextControl1 runat="server"> </aspSample:TextControl> </div> </form> </body> </html>
using System; using System.Web.UI; using System.Drawing; using System.Web.UI.Design; using System.Web.UI.WebControls; using System.ComponentModel; using System.ComponentModel.Design; namespace ASPNet.Design.Samples.CS { // Simple text Web control renders a text string. // This control is associated with the TextSizeWebControlDesigner. [DesignerAttribute(typeof(TextSizeWebControlDesigner)), ToolboxData("<{0}:TextControl runat=\"server\"></{0}:TextControl>")] public class TextControl : Label { private bool _largeText = true; // Constructor public TextControl() { Text = "Test Phrase"; SetSize(); } // Determines whether the text is large or small [Bindable(true), Category("Appearance"), DefaultValue("true")] public bool LargeText { get { return _largeText; } set { _largeText = value; SetSize(); } } // Applies the LargeText property to the control private void SetSize() { if (LargeText) this.Font.Size = FontUnit.XLarge; else this.Font.Size = FontUnit.Small; } } // This control designer offers DesignerActionList commands // that can alter the design time html of the associated control. public class TextSizeWebControlDesigner : ControlDesigner { private DesignerActionListCollection _actionLists = null; // Do not allow direct resizing of the control public override bool AllowResize { get { return false; } } // Return a custom ActionList collection public override DesignerActionListCollection ActionLists { get { if (_actionLists == null) { _actionLists = new DesignerActionListCollection(); _actionLists.AddRange(base.ActionLists); // Add a custom DesignerActionList _actionLists.Add(new ActionList(this)); } return _actionLists; } } public class ActionList : DesignerActionList { private TextSizeWebControlDesigner _parent; private DesignerActionItemCollection _items; // Constructor public ActionList(TextSizeWebControlDesigner parent) : base(parent.Component) { _parent = parent; } // Create the ActionItem collection and add one command public override DesignerActionItemCollection GetSortedActionItems() { if (_items == null) { _items = new DesignerActionItemCollection(); _items.Add(new DesignerActionMethodItem(this, "ToggleLargeText", "Toggle Text Size", true)); } return _items; } // ActionList command to change the text size private void ToggleLargeText() { // Get a reference to the parent designer's associated control TextControl ctl = (TextControl)_parent.Component; // Get a reference to the control's LargeText property PropertyDescriptor propDesc = TypeDescriptor.GetProperties(ctl)["LargeText"]; // Get the current value of the property bool v = (bool)propDesc.GetValue(ctl); // Toggle the property value propDesc.SetValue(ctl, !v); } } } } <br /><span space="preserve">...</span><br /><%@ Page Language="C#" %> <%@ Register TagPrefix="aspSample" Namespace="ASPNet.Design.Samples.CS" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> </script> <html > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <aspSample:TextControl ID=TextControl1 runat="server"> </aspSample:TextControl> </div> </form> </body> </html>

- SecurityPermission (アンマネージ コードを操作するために必要なアクセス許可)UnmanagedCode (関連する列挙体)

System.ComponentModel.Design.ComponentDesigner
System.Web.UI.Design.HtmlControlDesigner
System.Web.UI.Design.ControlDesigner
派生クラス


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ControlDesigner クラス
アセンブリ: System.Design (system.design.dll 内)


ControlDesigner は、Control から派生するコンポーネントのデザイナで使用する基本クラスを提供します。ControlDesigner は、ComponentDesigner クラスから継承したメソッドと機能の他に、デザイン時に関連する Control の動作を拡張および変更するための追加のメソッドを提供します。
DesignerAttribute を使用してデザイナに型を関連付けることができます。デザイン時の動作のカスタマイズの概要については、「デザイン時サポートの拡張」を参照してください。

MouseEnter イベントおよび MouseLeave イベントを処理し、デザイナ コードからコントロール上に描画し、IDesignerFilter インターフェイスの一部を使用してデザイン時にコントロールのプロパティを追加する、ControlDesigner 実装の例を次に示します。このサンプル コードには、デザイナおよびそのデザイナに関連付けられたサンプル ユーザー コントロールが含まれます。このサンプルをビルドするには、サンプルをコンパイルしてクラス ライブラリを作成し、このライブラリへの参照を Windows フォーム プロジェクトに追加します。次に、このコントロールをツールボックスに追加し、コントロールのインスタンスをフォームに追加します。このコントロールをポイントすると、コントロールを囲んでいる内側のアウトラインが強調表示されます。アウトラインには、デザイナがコントロールのプロパティのリストに追加した OutlineColor プロパティに対応した色が使用されます。
Imports System Imports System.ComponentModel Imports System.ComponentModel.Design Imports System.Collections Imports System.Drawing Imports System.Windows.Forms Imports System.Windows.Forms.Design Namespace ControlDesignerExample _ ' ExampleControlDesigner is an example control designer that ' demonstrates basic functions of a ControlDesigner. <System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _ Public Class TestControlDesigner Inherits System.Windows.Forms.Design.ControlDesigner ' This boolean state reflects whether the mouse is over the control. Private mouseover As Boolean = False ' This color is a private field for the OutlineColor property. Private lineColor As Color = Color.White ' This color is used to outline the control when the mouse is ' over the control. Public Property OutlineColor() As Color Get Return lineColor End Get Set(ByVal Value As Color) lineColor = Value End Set End Property Public Sub New() End Sub ' Sets a value and refreshes the control's display when the ' mouse position enters the area of the control. Protected Overrides Sub OnMouseEnter() Me.mouseover = True Me.Control.Refresh() End Sub ' Sets a value and refreshes the control's display when the ' mouse position enters the area of the control. Protected Overrides Sub OnMouseLeave() Me.mouseover = False Me.Control.Refresh() End Sub ' Draws an outline around the control when the mouse is ' over the control. Protected Overrides Sub OnPaintAdornments(ByVal pe As System.Windows.Forms.PaintEventArgs) If Me.mouseover Then pe.Graphics.DrawRectangle(New Pen(New SolidBrush(Me.lineColor), 6), 0, 0, Me.Control.Size.Width, Me.Control.Size.Height) End If End Sub ' Adds a property to this designer's control at design time ' that indicates the outline color to use. Protected Overrides Sub PreFilterProperties(ByVal properties As System.Collections.IDictionary) properties.Add("OutlineColor", TypeDescriptor.CreateProperty(GetType(TestControlDesigner), "OutlineColor", GetType(System.Drawing.Color), Nothing)) End Sub End Class ' This example control demonstrates the ExampleControlDesigner. <DesignerAttribute(GetType(TestControlDesigner))> _ Public Class TestControl Inherits System.Windows.Forms.UserControl Private components As System.ComponentModel.Container = Nothing Public Sub New() components = New System.ComponentModel.Container() End Sub Protected Overloads Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub End Class End Namespace
using System; using System.ComponentModel; using System.ComponentModel.Design; using System.Collections; using System.Drawing; using System.Windows.Forms; using System.Windows.Forms.Design; namespace ControlDesignerExample { // ExampleControlDesigner is an example control designer that // demonstrates basic functions of a ControlDesigner. [System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] public class ExampleControlDesigner : System.Windows.Forms.Design.ControlDesigner { // This boolean state reflects whether the mouse is over the control. private bool mouseover = false; // This color is a private field for the OutlineColor property. private Color lineColor = Color.White; // This color is used to outline the control when the mouse is // over the control. public Color OutlineColor { get { return lineColor; } set { lineColor = value; } } public ExampleControlDesigner() { } // Sets a value and refreshes the control's display when the // mouse position enters the area of the control. protected override void OnMouseEnter() { this.mouseover = true; this.Control.Refresh(); } // Sets a value and refreshes the control's display when the // mouse position enters the area of the control. protected override void OnMouseLeave() { this.mouseover = false; this.Control.Refresh(); } // Draws an outline around the control when the mouse is // over the control. protected override void OnPaintAdornments(System.Windows.Forms.PaintEventArgs pe) { if(this.mouseover) pe.Graphics.DrawRectangle(new Pen(new SolidBrush(this.lineColor), 6), 0, 0, this.Control.Size.Width, this.Control.Size.Height); } // Adds a property to this designer's control at design time // that indicates the outline color to use. protected override void PreFilterProperties(System.Collections.IDictionary properties) { properties.Add("OutlineColor", TypeDescriptor.CreateProperty(typeof(ExampleControlDesigner), "OutlineColor", typeof(System.Drawing.Color), null)); } } // This example control demonstrates the ExampleControlDesigner. [DesignerAttribute(typeof(ExampleControlDesigner))] public class ExampleControl : System.Windows.Forms.UserControl { private System.ComponentModel.Container components = null; public ExampleControl() { components = new System.ComponentModel.Container(); } protected override void Dispose( bool disposing ) { if( disposing ) { if( components != null ) components.Dispose(); } base.Dispose( disposing ); } } }
using namespace System; using namespace System::ComponentModel; using namespace System::ComponentModel::Design; using namespace System::Collections; using namespace System::Drawing; using namespace System::Windows::Forms; using namespace System::Windows::Forms::Design; using namespace System::Security::Permissions; public ref class TestControlDesigner: public System::Windows::Forms::Design::ControlDesigner { private: bool mouseover; Color lineColor; public: property Color OutlineColor { Color get() { return lineColor; } void set( Color value ) { lineColor = value; } } TestControlDesigner() { mouseover = false; lineColor = Color::White; } protected: virtual void OnMouseEnter() override { this->mouseover = true; this->Control->Refresh(); } virtual void OnMouseLeave() override { this->mouseover = false; this->Control->Refresh(); } virtual void OnPaintAdornments( System::Windows::Forms::PaintEventArgs^ pe ) override { if ( this->mouseover ) pe->Graphics->DrawRectangle( gcnew Pen( gcnew SolidBrush( this->lineColor ),6 ), 0, 0, this->Control->Size.Width, this->Control->Size.Height ); } protected: [ReflectionPermission(SecurityAction::Demand, Flags=ReflectionPermissionFlag::MemberAccess)] virtual void PreFilterProperties( System::Collections::IDictionary^ properties ) override { properties->Add( "OutlineColor", TypeDescriptor::CreateProperty( TestControlDesigner::typeid, "OutlineColor", System::Drawing::Color::typeid, nullptr ) ); } }; [DesignerAttribute(TestControlDesigner::typeid)] public ref class TestControl: public System::Windows::Forms::UserControl { private: System::ComponentModel::Container^ components; public: TestControl() { components = gcnew System::ComponentModel::Container; } protected: ~TestControl() { if ( components != nullptr ) { delete components; } } };

System.ComponentModel.Design.ComponentDesigner
System.Windows.Forms.Design.ControlDesigner
System.Windows.Forms.Design.ParentControlDesigner


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


ControlDesigner コンストラクタ
アセンブリ: System.Design (system.design.dll 内)



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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ControlDesigner コンストラクタ
アセンブリ: System.Design (system.design.dll 内)



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


ControlDesigner フィールド
ControlDesigner プロパティ


名前 | 説明 | |
---|---|---|
![]() | DataBindingsEnabled | 関連付けられているコントロールの格納先の領域がデータ バインディングをサポートするかどうかを示す値を取得します。 |
![]() | DesignerState | デザイン時に関連付けられているコントロールのデータを永続化するために使用するオブジェクトを取得します。 |
![]() | DesignTimeElement | デザイン サーフェイスの HtmlControlDesigner オブジェクトと関連付けられているコントロールを表すデザイン時オブジェクトを取得します。 ( HtmlControlDesigner から継承されます。) |
![]() | DesignTimeElementView | コントロール デザイナのビュー コントロール オブジェクトを取得します。 |
![]() | HidePropertiesInTemplateMode | コントロールがテンプレート モードのときに関連付けられているコントロールのプロパティが非表示に設定されるかどうかを示す値を取得します。 |
![]() | InheritanceAttribute | 関連付けられているコンポーネントの継承の種類を示す属性を取得します。 ( ComponentDesigner から継承されます。) |
![]() | Inherited | コンポーネントが継承されているかどうかを示す値を取得します。 ( ComponentDesigner から継承されます。) |
![]() | InTemplateMode | デザイン ホストでコントロールがテンプレート表示モードまたは編集モードのいずれかであるかどうかを示す値を取得します。InTemplateMode プロパティは読み取り専用です。 |
![]() | ParentComponent | このデザイナの親コンポーネントを取得します。 ( ComponentDesigner から継承されます。) |
![]() | RootDesigner | 関連付けられているコントロールを含む Web フォーム ページのコントロール デザイナを取得します。 |
![]() | ShadowProperties | ユーザー設定値をオーバーライドするプロパティ値のコレクションを取得します。 ( ComponentDesigner から継承されます。) |
![]() | Tag | 関連付けられているコントロールの HTML マークアップ要素を表すオブジェクトを取得します。 |
![]() | UsePreviewControl | コントロール デザイナが一時プレビュー コントロールを使用してデザイン時 HTML マークアップを生成するかどうかを示す値を取得します。 |

ControlDesigner プロパティ

名前 | 説明 | |
---|---|---|
![]() | AccessibilityObject | コントロールに割り当てられた AccessibleObject を取得します。 |
![]() | ActionLists | デザイナに関連付けられているコンポーネントでサポートされているデザイン時アクション リストを取得します。 ( ComponentDesigner から継承されます。) |
![]() | AssociatedComponents | オーバーライドされます。 デザイナで管理されているコンポーネントに関連付けられているコンポーネントのコレクションを取得します。 |
![]() | AutoResizeHandles | AutoSize プロパティの値に基づいてサイズ変更ハンドルを割り当てるかどうかを示す値を取得または設定します。 |
![]() | Component | デザイナがデザインするコンポーネントを取得します。 ( ComponentDesigner から継承されます。) |
![]() | Control | デザイナがデザインするコントロールを取得します。 |
![]() | ParticipatesWithSnapLines | ドラッグ操作中に ControlDesigner でスナップ線を配置できるかどうかを示す値を取得します。 |
![]() | SelectionRules | コンポーネントの移動機能を示す選択規則を取得します。 |
![]() | SnapLines | このコントロールの有効な配置ポイントを表す SnapLine オブジェクトの一覧を取得します。 |
![]() | Verbs | デサイナに関連付けられているコンポーネントがサポートしているデザイン時の動詞を取得します。 ( ComponentDesigner から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | BehaviorService | デザイン環境から BehaviorService を取得します。 |
![]() | EnableDragRect | ドラッグ四角形をこのデザイナ コンポーネントに描画できるかどうかを示す値を取得します。 |
![]() | InheritanceAttribute | オーバーライドされます。 デザイナの System.ComponentModel.InheritanceAttribute を取得します。 |
![]() | Inherited | コンポーネントが継承されているかどうかを示す値を取得します。 ( ComponentDesigner から継承されます。) |
![]() | ParentComponent | オーバーライドされます。 ControlDesigner の親コンポーネントを取得します。 |
![]() | ShadowProperties | ユーザー設定値をオーバーライドするプロパティ値のコレクションを取得します。 ( ComponentDesigner から継承されます。) |

ControlDesigner メソッド


名前 | 説明 | |
---|---|---|
![]() | CreateErrorDesignTimeHtml | オーバーロードされます。 デザイン時にエラー メッセージを表示するための HTML マークアップを作成します。 |
![]() | CreatePlaceHolderDesignTimeHtml | オーバーロードされます。 コントロールの種類と ID を表示する単純な四角形のプレースホルダ表示を提供します。 |
![]() | CreateViewControl | デザイン サーフェイスで表示または描画するために関連付けられているコントロールのコピーを返します。 |
![]() | Dispose | オーバーロードされます。 HtmlControlDesigner オブジェクトによって使用されているアンマネージ リソースを解放します。オプションでマネージ リソースも解放できます。 ( HtmlControlDesigner から継承されます。) |
![]() | Finalize | ガベージ コレクションでオブジェクトがクリアされる前に、Dispose(false) を呼び出して、リソースの解放を試みます。 ( ComponentDesigner から継承されます。) |
![]() | GetEmptyDesignTimeHtml | 実行時にビジュアルな表示が存在しない Web サーバー コントロールをデザイン時に表すための HTML マークアップを取得します。 |
![]() | GetErrorDesignTimeHtml | 指定された例外に関する情報を提供する HTML マークアップを取得します。 |
![]() | GetService | デザイナのコンポーネントのデザイン モード サイトから、指定した型のサービスの取得を試みます。 ( ComponentDesigner から継承されます。) |
![]() | InvokeGetInheritanceAttribute | 指定した ComponentDesigner の InheritanceAttribute を取得します。 ( ComponentDesigner から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
![]() | OnBehaviorAttached | 動作が要素に関連付けられたときに呼び出されます。 ( HtmlControlDesigner から継承されます。) |
![]() | OnBehaviorDetaching | 動作と要素の関連付けが解除されたときに呼び出されます。 ( HtmlControlDesigner から継承されます。) |
![]() | OnBindingsCollectionChanged | オーバーライドされます。 データ バインディング コレクションが変更されると、呼び出されます。 |
![]() | OnClick | 関連付けられているコントロールをデザイン時にユーザーがクリックすると、デザイン ホストによって呼び出されます。 |
![]() | OnControlResize | 関連付けられている Web サーバー コントロールのサイズがデザイン時にデザイン ホストで変更された場合に呼び出されます。 |
![]() | OnPaint | CustomPaint 値が true の場合に、コントロール デザイナが関連付けられているコントロールをデザイン サーフェイスに描画すると呼び出されます。 |
![]() | PostFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性から、項目を変更または削除できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PostFilterEvents | デザイナが、TypeDescriptor を通じて公開する一連のイベントから、項目を変更または削除できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PostFilterProperties | デザイナが、TypeDescriptor を通じて公開する一連のプロパティから、項目を変更または削除できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PreFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性に項目を追加できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PreFilterEvents | デザイン時にコンポーネントの TypeDescriptor オブジェクトに公開されているイベントのリストを設定します。 ( HtmlControlDesigner から継承されます。) |
![]() | PreFilterProperties | オーバーライドされます。 デザイン時にデザイン ホストのプロパティ グリッドを対象にプロパティの追加や削除を行ったり、関連付けられたコントロール上のプロパティに対応する新しいデザイン時プロパティを提供したりします。 |
![]() | RaiseComponentChanged | コンポーネントが変更されたことを IComponentChangeService に通知します。 ( ComponentDesigner から継承されます。) |
![]() | RaiseComponentChanging | コンポーネントが変更されようとしていることを IComponentChangeService に通知します。 ( ComponentDesigner から継承されます。) |
![]() | SetRegionContent | コントロールのデザイン時ビューの編集可能領域の内容を指定します。 |
![]() | SetViewFlags | 指定したビットごとの ViewFlags 列挙体を指定したフラグ値に割り当てます。 |

ControlDesigner メソッド


名前 | 説明 | |
---|---|---|
![]() | BaseWndProc | Windows メッセージを処理します。 |
![]() | DefWndProc | Windows メッセージの既定の処理を提供します。 |
![]() | DisplayError | 指定した例外に関する情報をユーザーに表示します。 |
![]() | Dispose | オーバーロードされます。 オーバーライドされます。 ControlDesigner によって使用されているアンマネージ リソースを解放し、オプションでマネージ リソースも解放します。 |
![]() | EnableDesignMode | 子コントロールに対するデザイン時の機能を有効にします。 |
![]() | EnableDragDrop | デザイン中のコントロールに対して、ドラッグ アンド ドロップのサポートを有効または無効にします。 |
![]() | Finalize | ガベージ コレクションでオブジェクトがクリアされる前に、Dispose(false) を呼び出して、リソースの解放を試みます。 ( ComponentDesigner から継承されます。) |
![]() | GetControlGlyph | このコントロールのバインドを表す ControlBodyGlyph を返します。 |
![]() | GetHitTest | 指定した点でのマウス クリックがコントロールによって処理されるかどうかを示します。 |
![]() | GetService | デザイナのコンポーネントのデザイン モード サイトから、指定した型のサービスの取得を試みます。 ( ComponentDesigner から継承されます。) |
![]() | HookChildControls | 指定したコントロールの子コントロールからのメッセージをデザイナにルーティングします。 |
![]() | InvokeGetInheritanceAttribute | 指定した ComponentDesigner の InheritanceAttribute を取得します。 ( ComponentDesigner から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
![]() | OnContextMenu | コンテキスト メニューを表示し、コンテキスト メニューが表示される直前に追加処理を実行する機会を提供します。 |
![]() | OnCreateHandle | 制御ハンドルが作成された直後に、追加処理を実行する機会を提供します。 |
![]() | OnDragComplete | ドラッグ アンド ドロップ操作をクリーンアップするための呼び出しを受信します。 |
![]() | OnDragDrop | ドラッグ アンド ドロップ オブジェクトがコントロールのデザイナ ビューにドロップされると呼び出しを受信します。 |
![]() | OnDragEnter | ドラッグ アンド ドロップ操作がコントロールのデザイナ ビューに入ると呼び出しを受信します。 |
![]() | OnDragLeave | ドラッグ アンド ドロップ操作がコントロールのデザイナ ビューを離れると呼び出しを受信します。 |
![]() | OnDragOver | ドラッグ アンド ドロップ オブジェクトがコントロールのデザイナ ビュー上にドラッグされると呼び出しを受信します。 |
![]() | OnGiveFeedback | ドラッグ アンド ドロップの操作中に呼び出しを受信し、ドラッグ操作のマウスの位置に基づいてビジュアル キューを提供します。 |
![]() | OnMouseDragBegin | コンポーネント上でマウスの左ボタンをしばらく押したままにすると応答して呼び出しを受信します。 |
![]() | OnMouseDragEnd | ドラッグ アンド ドロップ操作の終了時に呼び出しを受信し、操作を完了またはキャンセルします。 |
![]() | OnMouseDragMove | ドラッグ アンド ドロップ操作中にマウスが移動するたびに呼び出しを受信します。 |
![]() | OnMouseEnter | マウスが最初にコントロールに入ると呼び出しを受信します。 |
![]() | OnMouseHover | マウスがコントロールの上にあるときに呼び出しを受信します。 |
![]() | OnMouseLeave | マウスが最初にコントロールに入ると呼び出しを受信します。 |
![]() | OnPaintAdornments | デザイナが管理しているコントロールが表面を描画したときに呼び出しを受信し、デザイナがコントロールの一番上に追加の表示要素を描画できるようにします。 |
![]() | OnSetCursor | カーソルを設定する必要があるたびに呼び出しを受信します。 |
![]() | PostFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性から、項目を変更または削除できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PostFilterEvents | デザイナが、TypeDescriptor を通じて公開する一連のイベントから、項目を変更または削除できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PostFilterProperties | デザイナが、TypeDescriptor を通じて公開する一連のプロパティから、項目を変更または削除できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PreFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性に項目を追加できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PreFilterEvents | デザイナが、TypeDescriptor を通じて公開する一連のイベントに項目を追加できるようにします。 ( ComponentDesigner から継承されます。) |
![]() | PreFilterProperties | オーバーライドされます。 TypeDescriptor を通じてコンポーネントが公開するプロパティのセットを調整します。 |
![]() | RaiseComponentChanged | コンポーネントが変更されたことを IComponentChangeService に通知します。 ( ComponentDesigner から継承されます。) |
![]() | RaiseComponentChanging | コンポーネントが変更されようとしていることを IComponentChangeService に通知します。 ( ComponentDesigner から継承されます。) |
![]() | UnhookChildControls | 指定したコントロールの子に対するメッセージを親デザイナではなく各コントロールにルーティングします。 |
![]() | WndProc | Windows メッセージを処理し、必要に応じてコントロールにルーティングします。 |

ControlDesigner メンバ
Web サーバー コントロールのデザイン モードの動作を拡張するための基本コントロール デザイナ クラスを提供します。
ControlDesigner データ型で公開されるメンバを以下の表に示します。



名前 | 説明 | |
---|---|---|
![]() | DataBindingsEnabled | 関連付けられているコントロールの格納先の領域がデータ バインディングをサポートするかどうかを示す値を取得します。 |
![]() | DesignerState | デザイン時に関連付けられているコントロールのデータを永続化するために使用するオブジェクトを取得します。 |
![]() | DesignTimeElement | デザイン サーフェイスの HtmlControlDesigner オブジェクトと関連付けられているコントロールを表すデザイン時オブジェクトを取得します。(HtmlControlDesigner から継承されます。) |
![]() | DesignTimeElementView | コントロール デザイナのビュー コントロール オブジェクトを取得します。 |
![]() | HidePropertiesInTemplateMode | コントロールがテンプレート モードのときに関連付けられているコントロールのプロパティが非表示に設定されるかどうかを示す値を取得します。 |
![]() | InheritanceAttribute | 関連付けられているコンポーネントの継承の種類を示す属性を取得します。(ComponentDesigner から継承されます。) |
![]() | Inherited | コンポーネントが継承されているかどうかを示す値を取得します。(ComponentDesigner から継承されます。) |
![]() | InTemplateMode | デザイン ホストでコントロールがテンプレート表示モードまたは編集モードのいずれかであるかどうかを示す値を取得します。InTemplateMode プロパティは読み取り専用です。 |
![]() | ParentComponent | このデザイナの親コンポーネントを取得します。(ComponentDesigner から継承されます。) |
![]() | RootDesigner | 関連付けられているコントロールを含む Web フォーム ページのコントロール デザイナを取得します。 |
![]() | ShadowProperties | ユーザー設定値をオーバーライドするプロパティ値のコレクションを取得します。(ComponentDesigner から継承されます。) |
![]() | Tag | 関連付けられているコントロールの HTML マークアップ要素を表すオブジェクトを取得します。 |
![]() | UsePreviewControl | コントロール デザイナが一時プレビュー コントロールを使用してデザイン時 HTML マークアップを生成するかどうかを示す値を取得します。 |


名前 | 説明 | |
---|---|---|
![]() | CreateErrorDesignTimeHtml | オーバーロードされます。 デザイン時にエラー メッセージを表示するための HTML マークアップを作成します。 |
![]() | CreatePlaceHolderDesignTimeHtml | オーバーロードされます。 コントロールの種類と ID を表示する単純な四角形のプレースホルダ表示を提供します。 |
![]() | CreateViewControl | デザイン サーフェイスで表示または描画するために関連付けられているコントロールのコピーを返します。 |
![]() | Dispose | オーバーロードされます。 HtmlControlDesigner オブジェクトによって使用されているアンマネージ リソースを解放します。オプションでマネージ リソースも解放できます。 (HtmlControlDesigner から継承されます。) |
![]() | Finalize | ガベージ コレクションでオブジェクトがクリアされる前に、Dispose(false) を呼び出して、リソースの解放を試みます。 (ComponentDesigner から継承されます。) |
![]() | GetEmptyDesignTimeHtml | 実行時にビジュアルな表示が存在しない Web サーバー コントロールをデザイン時に表すための HTML マークアップを取得します。 |
![]() | GetErrorDesignTimeHtml | 指定された例外に関する情報を提供する HTML マークアップを取得します。 |
![]() | GetService | デザイナのコンポーネントのデザイン モード サイトから、指定した型のサービスの取得を試みます。 (ComponentDesigner から継承されます。) |
![]() | InvokeGetInheritanceAttribute | 指定した ComponentDesigner の InheritanceAttribute を取得します。 (ComponentDesigner から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
![]() | OnBehaviorAttached | 動作が要素に関連付けられたときに呼び出されます。 (HtmlControlDesigner から継承されます。) |
![]() | OnBehaviorDetaching | 動作と要素の関連付けが解除されたときに呼び出されます。 (HtmlControlDesigner から継承されます。) |
![]() | OnBindingsCollectionChanged | オーバーライドされます。 データ バインディング コレクションが変更されると、呼び出されます。 |
![]() | OnClick | 関連付けられているコントロールをデザイン時にユーザーがクリックすると、デザイン ホストによって呼び出されます。 |
![]() | OnControlResize | 関連付けられている Web サーバー コントロールのサイズがデザイン時にデザイン ホストで変更された場合に呼び出されます。 |
![]() | OnPaint | CustomPaint 値が true の場合に、コントロール デザイナが関連付けられているコントロールをデザイン サーフェイスに描画すると呼び出されます。 |
![]() | PostFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性から、項目を変更または削除できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PostFilterEvents | デザイナが、TypeDescriptor を通じて公開する一連のイベントから、項目を変更または削除できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PostFilterProperties | デザイナが、TypeDescriptor を通じて公開する一連のプロパティから、項目を変更または削除できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PreFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性に項目を追加できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PreFilterEvents | デザイン時にコンポーネントの TypeDescriptor オブジェクトに公開されているイベントのリストを設定します。 (HtmlControlDesigner から継承されます。) |
![]() | PreFilterProperties | オーバーライドされます。 デザイン時にデザイン ホストのプロパティ グリッドを対象にプロパティの追加や削除を行ったり、関連付けられたコントロール上のプロパティに対応する新しいデザイン時プロパティを提供したりします。 |
![]() | RaiseComponentChanged | コンポーネントが変更されたことを IComponentChangeService に通知します。 (ComponentDesigner から継承されます。) |
![]() | RaiseComponentChanging | コンポーネントが変更されようとしていることを IComponentChangeService に通知します。 (ComponentDesigner から継承されます。) |
![]() | SetRegionContent | コントロールのデザイン時ビューの編集可能領域の内容を指定します。 |
![]() | SetViewFlags | 指定したビットごとの ViewFlags 列挙体を指定したフラグ値に割り当てます。 |

ControlDesigner メンバ
ControlDesigner データ型で公開されるメンバを以下の表に示します。



名前 | 説明 | |
---|---|---|
![]() | AccessibilityObject | コントロールに割り当てられた AccessibleObject を取得します。 |
![]() | ActionLists | デザイナに関連付けられているコンポーネントでサポートされているデザイン時アクション リストを取得します。(ComponentDesigner から継承されます。) |
![]() | AssociatedComponents | オーバーライドされます。 デザイナで管理されているコンポーネントに関連付けられているコンポーネントのコレクションを取得します。 |
![]() | AutoResizeHandles | AutoSize プロパティの値に基づいてサイズ変更ハンドルを割り当てるかどうかを示す値を取得または設定します。 |
![]() | Component | デザイナがデザインするコンポーネントを取得します。(ComponentDesigner から継承されます。) |
![]() | Control | デザイナがデザインするコントロールを取得します。 |
![]() | ParticipatesWithSnapLines | ドラッグ操作中に ControlDesigner でスナップ線を配置できるかどうかを示す値を取得します。 |
![]() | SelectionRules | コンポーネントの移動機能を示す選択規則を取得します。 |
![]() | SnapLines | このコントロールの有効な配置ポイントを表す SnapLine オブジェクトの一覧を取得します。 |
![]() | Verbs | デサイナに関連付けられているコンポーネントがサポートしているデザイン時の動詞を取得します。(ComponentDesigner から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | BehaviorService | デザイン環境から BehaviorService を取得します。 |
![]() | EnableDragRect | ドラッグ四角形をこのデザイナ コンポーネントに描画できるかどうかを示す値を取得します。 |
![]() | InheritanceAttribute | オーバーライドされます。 デザイナの System.ComponentModel.InheritanceAttribute を取得します。 |
![]() | Inherited | コンポーネントが継承されているかどうかを示す値を取得します。(ComponentDesigner から継承されます。) |
![]() | ParentComponent | オーバーライドされます。 ControlDesigner の親コンポーネントを取得します。 |
![]() | ShadowProperties | ユーザー設定値をオーバーライドするプロパティ値のコレクションを取得します。(ComponentDesigner から継承されます。) |


名前 | 説明 | |
---|---|---|
![]() | BaseWndProc | Windows メッセージを処理します。 |
![]() | DefWndProc | Windows メッセージの既定の処理を提供します。 |
![]() | DisplayError | 指定した例外に関する情報をユーザーに表示します。 |
![]() | Dispose | オーバーロードされます。 オーバーライドされます。 ControlDesigner によって使用されているアンマネージ リソースを解放し、オプションでマネージ リソースも解放します。 |
![]() | EnableDesignMode | 子コントロールに対するデザイン時の機能を有効にします。 |
![]() | EnableDragDrop | デザイン中のコントロールに対して、ドラッグ アンド ドロップのサポートを有効または無効にします。 |
![]() | Finalize | ガベージ コレクションでオブジェクトがクリアされる前に、Dispose(false) を呼び出して、リソースの解放を試みます。 (ComponentDesigner から継承されます。) |
![]() | GetControlGlyph | このコントロールのバインドを表す ControlBodyGlyph を返します。 |
![]() | GetHitTest | 指定した点でのマウス クリックがコントロールによって処理されるかどうかを示します。 |
![]() | GetService | デザイナのコンポーネントのデザイン モード サイトから、指定した型のサービスの取得を試みます。 (ComponentDesigner から継承されます。) |
![]() | HookChildControls | 指定したコントロールの子コントロールからのメッセージをデザイナにルーティングします。 |
![]() | InvokeGetInheritanceAttribute | 指定した ComponentDesigner の InheritanceAttribute を取得します。 (ComponentDesigner から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
![]() | OnContextMenu | コンテキスト メニューを表示し、コンテキスト メニューが表示される直前に追加処理を実行する機会を提供します。 |
![]() | OnCreateHandle | 制御ハンドルが作成された直後に、追加処理を実行する機会を提供します。 |
![]() | OnDragComplete | ドラッグ アンド ドロップ操作をクリーンアップするための呼び出しを受信します。 |
![]() | OnDragDrop | ドラッグ アンド ドロップ オブジェクトがコントロールのデザイナ ビューにドロップされると呼び出しを受信します。 |
![]() | OnDragEnter | ドラッグ アンド ドロップ操作がコントロールのデザイナ ビューに入ると呼び出しを受信します。 |
![]() | OnDragLeave | ドラッグ アンド ドロップ操作がコントロールのデザイナ ビューを離れると呼び出しを受信します。 |
![]() | OnDragOver | ドラッグ アンド ドロップ オブジェクトがコントロールのデザイナ ビュー上にドラッグされると呼び出しを受信します。 |
![]() | OnGiveFeedback | ドラッグ アンド ドロップの操作中に呼び出しを受信し、ドラッグ操作のマウスの位置に基づいてビジュアル キューを提供します。 |
![]() | OnMouseDragBegin | コンポーネント上でマウスの左ボタンをしばらく押したままにすると応答して呼び出しを受信します。 |
![]() | OnMouseDragEnd | ドラッグ アンド ドロップ操作の終了時に呼び出しを受信し、操作を完了またはキャンセルします。 |
![]() | OnMouseDragMove | ドラッグ アンド ドロップ操作中にマウスが移動するたびに呼び出しを受信します。 |
![]() | OnMouseEnter | マウスが最初にコントロールに入ると呼び出しを受信します。 |
![]() | OnMouseHover | マウスがコントロールの上にあるときに呼び出しを受信します。 |
![]() | OnMouseLeave | マウスが最初にコントロールに入ると呼び出しを受信します。 |
![]() | OnPaintAdornments | デザイナが管理しているコントロールが表面を描画したときに呼び出しを受信し、デザイナがコントロールの一番上に追加の表示要素を描画できるようにします。 |
![]() | OnSetCursor | カーソルを設定する必要があるたびに呼び出しを受信します。 |
![]() | PostFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性から、項目を変更または削除できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PostFilterEvents | デザイナが、TypeDescriptor を通じて公開する一連のイベントから、項目を変更または削除できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PostFilterProperties | デザイナが、TypeDescriptor を通じて公開する一連のプロパティから、項目を変更または削除できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PreFilterAttributes | デザイナが、TypeDescriptor を通じて公開する一連の属性に項目を追加できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PreFilterEvents | デザイナが、TypeDescriptor を通じて公開する一連のイベントに項目を追加できるようにします。 (ComponentDesigner から継承されます。) |
![]() | PreFilterProperties | オーバーライドされます。 TypeDescriptor を通じてコンポーネントが公開するプロパティのセットを調整します。 |
![]() | RaiseComponentChanged | コンポーネントが変更されたことを IComponentChangeService に通知します。 (ComponentDesigner から継承されます。) |
![]() | RaiseComponentChanging | コンポーネントが変更されようとしていることを IComponentChangeService に通知します。 (ComponentDesigner から継承されます。) |
![]() | UnhookChildControls | 指定したコントロールの子に対するメッセージを親デザイナではなく各コントロールにルーティングします。 |
![]() | WndProc | Windows メッセージを処理し、必要に応じてコントロールにルーティングします。 |

- ControlDesignerのページへのリンク