Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [Collapse]Task-Based Help
  [Expand]Business Model Design
  [Expand]Application Model
  [Collapse]Actions
    How to: Add a Search Action to Lookup Property Editors and Link Pop-up Windows
    How to: Add the Analyze Action to List Views
    How to: Create an Action Using the Action Attribute
    How to: Customize Action Controls
    How to: Customize the Export Action Behavior
    How to: Customize the New Action's Items List
    How to: Deactivate (Hide) an Action in Code
    How to: Disable an Action When the Current View Has Unsaved Changes
    How to: Hide the Edit Action Column from a ListView in an ASP.NET Application
    How to: Initialize an Object Created Using the New Action
    How to: Limit the Amount of Objects Created using the New Action
    How to: Make the FullTextSearch Action Search Within Required Properties
    How to: Reorder an Action Container's Actions Collection
    How to: Replace a List View's Default Action
  [Expand]Navigation
  [Expand]Views
  [Expand]List Editors
  [Expand]Property Editors
  [Expand]Templates
  [Expand]Filtering
  [Expand]Reporting
  [Expand]Dashboards
  [Expand]Scheduler and Notifications
  [Expand]Maps
  [Expand]Security
  [Expand]Workflow
  [Expand]Localization
  [Expand]Testing
  [Expand]Miscellaneous UI Customizations
  Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Reorder an Action Container's Actions Collection

In an XAF application UI, Actions are located within Action Containers. You can use the ActionBase.Category property and the Application Model's ActionDesign | ActionToContainerMapping node to move the Action to another Action Container (see Place an Action in a Different Location). This topic describes how to reorder Actions within a specific container.

Presume you have the MyAction Action implemented in the MyController Controller. The ActionBase.Category property is set to View for this Action. This means that the Action is displayed within the View Action Container. This Container may also contain other Actions - custom Actions, and actions from referenced modules. To reorder Actions of the View Action Container (or any other Action Container), invoke the Model Editor for the WinForms, ASP.NET or Mobile application project. Locate the ActionDesign | ActionToContainerMapping | View node. The following image shows that there are three Actions in the View Action Container.

To reorder these Actions, change the Index property for each Action. For instance, use the "0" value for MyAction, "1" - for Refresh, "2" - for ExecuteReport.

If you run the application, you can ensure that the Actions order is changed as follows.

Note

  • Actions from the Unspecified Action Container can be displayed by another container if you change the IFrameTemplate.DefaultContainer value for the current Template. These Actions are appended to the end of the collection. If you need to change their position within the Container, then first specify their Action Container explicitly.
  • In the application with the TabbedMDI UI type (see MdiShowViewStrategy), the main window's Actions collection is merged with the child window's Actions, which can influence the resulting Actions order.

Tip

To change Action Containers order and location, customize the Template. In WinForms applications, you can also use the runtime customization capabilities.

Expanded See Also

How would you rate this topic?​​​​​​​