System.ComponentModel.Design.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 DesignerActionItem.Category property value.

Syntax

public bool AllowAssociate { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Because multiple System.ComponentModel.Design.DesignerActionList objects may be combined to form a single smart tag panel, the DesignerActionItem.AllowAssociate property indicates whether the current item can be rearranged by category.

The DesignerActionItem.AllowAssociate property is used in conjunction with the DesignerActionMethodItem.RelatedComponent property on the System.ComponentModel.Design.DesignerActionMethodItem and System.ComponentModel.Design.DesignerActionPropertyItem types.

For example, ASP.NET uses a data-bound control like System.Web.UI.WebControls.GridView to connect to a data source control like System.Web.UI.WebControls.SqlDataSource. Both have a System.ComponentModel.Design.DesignerActionList with its own set of System.ComponentModel.Design.DesignerActionItem objects. The System.Web.UI.WebControls.GridView control has items like System.Web.UI.WebControls.BaseDataBoundControl.DataSourceID, Edit Fields, and AutoFormat. The System.Web.UI.WebControls.SqlDataSource class has Configure and Refresh Items, which have DesignerActionItem.AllowAssociate set to true.

The System.Web.UI.WebControls.GridView control's System.Web.UI.WebControls.BaseDataBoundControl.DataSourceID item has a related component, which is the System.Web.UI.WebControls.SqlDataSource object. All the System.Web.UI.WebControls.SqlDataSource object's items that have DesignerActionItem.AllowAssociate set to true are automatically included in the System.Web.UI.WebControls.GridView control's action list. The following table shows how the two lists are merged in the System.Web.UI.WebControls.GridView control's designer action list.

  • DataSourceID (related component = SqlDataSource)

  • Edit Fields

  • AutoFormat

  • Configure (AllowAssociate = true)

  • Refresh (AllowAssociate = true)

  • DataSourceID

  • Configure

  • Refresh

  • Edit Fields

  • AutoFormat

Requirements

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