Skip to main content
.NET Framework 4.5.2+

ShowViewParameters Class

Represents a set of parameters used to display a new View.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v22.1.dll


public class ShowViewParameters


When handling the Execute event of an ActionBase class descendant, you can specify a View to be displayed after the Action execution. For this purpose, use the ShowViewParameters object passed as the Execute event handler’s ActionBaseEventArgs.ShowViewParameters parameter. Set the View to be displayed for the ShowViewParameters.CreatedView property. To specify the type of the Window that will contain the created View, use the ShowViewParameters.TargetWindow property. To specify a Template context for the target Window, specify the ShowViewParameters.Context property. In addition, you can specify the Controllers to be activated for the View and the Window to be displayed. For this purpose, use the ShowViewParameters.Controllers collection. For instance, add a DialogController to this collection if the target Window is a pop-up. The following code demonstrates how to use a ShowViewParameters object in an Action’s Execute event handler.

using DevExpress.ExpressApp.SystemModule;
// ...
void myAction_Execute(Object sender, SimpleActionExecuteEventArgs e) {
   IObjectSpace objectSpace = Application.CreateObjectSpace(typeof(MyBusinessClass));
   string listViewId = Application.FindListViewId(typeof(MyBusinessClass));
   e.ShowViewParameters.CreatedView = Application.CreateListView(
   e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;

The properties specified for a ShowViewParameters object are considered by the active WinApplication.ShowViewStrategy or XafApplication.ShowViewStrategy which manages the Windows and Views display. In special scenarios, you may need to call the ShowViewStrategyBase.ShowView method to show a View. In this instance, you will have to create a ShowViewParameters object, and pass it as a parameter.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowViewParameters class.


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.


See Also