The LinkUnlinkController is intended for presenting the Link and Unlink Actions.
In a Windows Forms application:
In an ASP.NET application:
To customize the default behavior of the Link and Unlink Actions, you can inherit from this Controller, or subscribe to its events. In addition, you can access the Actions to modify their behavior.
If you need to inherit from the LinkUnlinkController, the following protected virtual methods are available for overriding:
|Method||When is it called?||Description|
|CreateLinkView||Invoked as a result of executing the Link Action.||Represents the Link Action's PopupWindowShowAction.CustomizePopupWindowParams event handler. Creates a List View for the Link Action's pop-up Window. This List View corresponds to the Views|
|CustomizeLinkTemplate||Invoked as a result of executing the Link Action.||Represents the Link Action's PopupWindowShowAction.CustomizeTemplate event handler. Adds the Search functionality according to the IModelCommonMemberViewItem.LookupEditorMode property of the current List Property Editor's Views | <DetailView> | Items | <PropertyEditor> node.|
|Link||Invoked as a result of executing the Link Action.||Represents the Link Action's PopupWindowShowAction.Execute event handler. Adds the invoked List View's selected objects to the current List View. Saves changes if the LinkUnlinkController.AutoCommit property is set to true.|
|Unlink||Invoked as a result of executing the Unlink Action.||Represents the Unlink Action's SimpleAction.Execute event handler. Removes the current List View's selected objects. Saves changes if the LinkUnlinkController.AutoCommit property is set to true.|
|UpdateActionsState||Called when the LinkUnlinkController is activated. In addition, it is called when the current ListView's CollectionSource is changed, and when the current View's View.AllowNew and View.AllowDelete properties are changed.||Updates the Link and Unlink Actions' active state (see ActionBase.Active).|
Public members are described individually in the documentation.
This Controller has the WebLinkUnlinkController descendant. It sets true for the LinkUnlinkController.AutoCommit property. If you need to implement a Web-specific functionality, inherit from this Controller. To implement a Windows Forms specific functionality, inherit from the base LinkUnlinkController.
This Controller is activated for the nested List Views that are displayed via the ListPropertyEditor. To ascertain whether the Controller is active, use the Controller.Active property. If you need to know the reason for its deactivation or activation at runtime, use the DiagnosticInfo Action.