A newer version of this page is available. Switch to the current version.

XafApplication.ShowViewStrategy Property

Specifies the application's Show View Strategy.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll


public ShowViewStrategyBase ShowViewStrategy { get; set; }
Public Property ShowViewStrategy As ShowViewStrategyBase

Property Value

Type Description

A ShowViewStrategyBase descendant that represents the application's Show View Strategy.


Show View Strategy is the object that manages View showing: whether to show a View in a lookup or common Window, in a new or the current Window, in a pop-up or modal Window and so on. The eXressApp Framework supplies several Show View Strategies: ShowInSingleWindowStrategy, ShowInMultipleWindowsStrategy, ShowViewStrategy, WinShowViewStrategyBase and ShowViewStrategyBase. By default, the ShowInMultipleWindowsStrategy strategy is used in Windows Forms applications and the ShowViewStrategy - in ASP.NET Web applications. For additional information on Show View Strategies, refer to the ShowViewStrategyBase class description.

To change the Show View Strategy used by an application, you can use the ShowViewStrategy property. The code below demonstrates how to set the MdiShowViewStrategy for the Windows Forms application. This strategy shows all Views in tabs. Create an instance of the MdiShowViewStrategy class and assign it to the WinApplication.ShowViewStrategy property in the Program.cs (Program.vb) file, before invoking the XafApplication.Setup method.

public static void Main(string[] arguments) {
    // ...
    winApplication.ShowViewStrategy = new MdiShowViewStrategy(winApplication);

In an XAF Windows Forms application, you can change the Show View Strategy by specifying the Application Model's IModelOptionsWin.UIType property of the Options node.

As the Show View Strategy can be changed during the application life cycle, it s recommended to subscribe to the ShowViewStrategy event from the XafApplication.ShowViewStrategyChanged event handler. An example is provided in the WinShowViewStrategyBase.WinWindowShowing topic.

See Also