This documentation is archived and is not being maintained.

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.

Namespace:  System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)

public:
property bool AllowAssociate {
	bool get ();
	void set (bool value);
}

Property Value

Type: System::Boolean
true 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

  • DataSourceID (related component = SqlDataSource)

  • Edit Fields

  • AutoFormat

  • Configure (AllowAssociate = true)

  • Refresh (AllowAssociate = true)

Merged GridView control's smart tasks panel

  • DataSourceID

  • Configure

  • Refresh

  • Edit Fields

  • AutoFormat

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

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.
Show: