ActionBase.CustomizeControl Event
Occurs after the control is initialized. Allows customizing the default control settings.
Namespace: DevExpress.ExpressApp.Actions
Assembly: DevExpress.ExpressApp.v18.1.dll
Declaration
Event Data
The CustomizeControl event's data class is CustomizeControlEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Control | Gets an object that allows you to access the control which is used to display an Action. |
Remarks
The CustomizeControlEventArgs.Control event parameter returns the Action Item object which provides access to the control settings. See all of the possible scenarios in the Action section of the Feature Center demo that is installed in the %PUBLIC%\Documents\DevExpress Demos 18.1\Components\eXpressApp Framework\FeatureCenter folder by default, or refer to the Feature Center demo online. The lists below show which type of Action Item is returned for different Action types.
ASP.NET Specific Scenarios
-
Returned value type:
- SimpleActionMenuActionItem - for menu Actions;
- ASPxGridViewCustomButtonInitializer - for Inline Grid Actions.
SingleChoiceAction menu Actions.
Returned value type depends on the SingleChoiceAction.ItemType property value and ChoiceActionItems sub items:
- SingleChoiceActionAsModeMenuActionItem;
- SingleChoiceActionItemAsHierarchicalModeActionMenuItem;
- SingleChoiceActionItemAsOperationActionMenuItem.
myAction.CustomizeControl += (s, e) => { SingleChoiceActionAsModeMenuActionItem actionItem = e.Control as SingleChoiceActionAsModeMenuActionItem; // or SingleChoiceActionItemAsHierarchicalModeActionMenuItem actionItem = e.Control as SingleChoiceActionItemAsHierarchicalModeActionMenuItem; // or SingleChoiceActionItemAsOperationActionMenuItem actionItem = e.Control as SingleChoiceActionItemAsOperationActionMenuItem; //... }
ShowNavigationItem Action returned by the ShowNavigationItemController.ShowNavigationItemAction property.
Returned value type:
- ASPxNavBar - if the IModelRootNavigationItems.NavigationStyle property is set to NavigationStyle.NavBar;
- ASPxTreeView - if the IModelRootNavigationItems.NavigationStyle property is set to NavigationStyle.TreeList.
-
Returned value type is ParametrizedActionMenuActionItem.
-
Returned value type:
- PopupWindowActionMenuActionItem - for menu Actions;
- ASPxGridViewCustomButtonInitializer - for Inline Grid Actions.
WinForms Specific Scenarios
-
Returned value type:
- SimpleButton - for Layout Actions;
- BarButtonItem - for BarManager Actions.
-
Returned value type:
- ImageComboBoxEdit - for Layout Actions;
- BarEditItem, BarButtonItem, RibbonGalleryBarItem - for BarManager Actions.
ShowNavigationItem Action returned by the ShowNavigationItemController.ShowNavigationItemAction property.
Returned value type:
- NavBarControl - if the IModelRootNavigationItems.NavigationStyle property is set to NavigationStyle.NavBar;
- TreeList - if the IModelRootNavigationItems.NavigationStyle property is set to NavigationStyle.TreeList.
-
Returned value type:
- Descendants of ButtonEdit (SpinEdit, ButtonEditWithClearButton, DateEdit) - for Layout Actions;
- BarEditItem - for BarManager Actions.
-
Returned value type:
- SimpleButton - for Layout Actions;
- BarButtonItem - for BarManager Actions.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomizeControl event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.