DesignerActionItem::AllowAssociate Property
Gets or sets a value indicating whether to allow this item to be placed into a group of items that have the same Category property value.
Assembly: System.Design (in System.Design.dll)
Property Value
Type: System::Booleantrue if the item can be grouped; otherwise, false. The default is false.
Because multiple DesignerActionList objects may be combined to form a single smart tag panel, the AllowAssociate property indicates whether the current item can be rearranged by category.
The AllowAssociate property is used in conjunction with the RelatedComponent property on the DesignerActionMethodItem and DesignerActionPropertyItem types.
For example, ASP.NET uses a data-bound control like GridView to connect to a data source control like SqlDataSource. Both have a DesignerActionList with its own set of DesignerActionItem objects. The GridView control has items like DataSourceID, Edit Fields, and AutoFormat. The SqlDataSource class has Configure and Refresh Items, which have AllowAssociate set to true.
The GridView control's DataSourceID item has a related component, which is the SqlDataSource object. All the SqlDataSource object's items that have AllowAssociate set to true are automatically included in the GridView control's action list. The following table shows how the two lists are merged in the GridView control's designer action list.
GridView items | SqlDataSource items |
|---|---|
|
|
Merged GridView control's smart tasks panel |
|---|
|
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.