Skip to main content
A newer version of this page is available. .

ShowViewStrategyBase Class

An abstract class that serves as the base class for the Show View Strategy classes.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public abstract class ShowViewStrategyBase :
    IDisposable

The following members return ShowViewStrategyBase objects:

Remarks

A Show View Strategy is the object that manages the display of Views in a UI. When an XAF application needs to display a View in a UI, it is the application’s Show View Strategy that decides where and how to display the View. For instance, if the Frame in which the View must be displayed is not specified, the Show View Strategy resolves the following questions:

  • Should the View be displayed in an existing Frame?
  • Should a new Window be created?
  • If a new Window should be created, must it be modal or not?

So, the two main tasks of a Show View Strategy are deciding where and how a View should be displayed and the display of Views in a UI.

Consider the following example. When a user clicks a record in a List View that is displayed in the main Window, a Detail View must be invoked. But this Detail View can be displayed in a UI in different ways. One of the available options is to display the Detail View in a new Window:

SVStrategy1

SVStrategy3

Another option is to display the Detail View in the same Window:

SVStrategy1

SVStrategy2

There are even more options available. For instance, you can use a multiple document interface (MDI), so that a new View is displayed in a separate tab within the main Window.

A Show View Strategy has a set of rules that govern all the possible scenarios defined within the Strategy. The example above illustrates only one kind of a rule - how to display a Detail View invoked from a List View that is displayed in the main Window. Each Strategy, however, has many additional rules - a set of rules for the nested Views, Views that are displayed via the Lookup Property Editors and so on.

A Show View Strategy is instantiated when the application is started. The particular Show View Strategy that must be used by the application is assigned to the XafApplication.ShowViewStrategy property.

The ShowViewStrategyBase class is an abstract class from which all the Show View Strategies derive. The following table lists XAF’s built-in Show View Strategies.

ShowViewStrategyBase Descendant Description
ShowViewStrategy Used by default in the XAF ASP.NET Web applications.
WinShowViewStrategyBase An abstract class from which all the Show View Strategies used in the XAF Windows Forms applications derive.
ShowInMultipleWindowsStrategy Used by default in the XAF Windows Forms applications.
ShowInSingleWindowStrategy A Show View Strategy that can be used as an alternative to the ShowInMultipleWindowsStrategy. Provides a different behavior when a Detail View is invoked from a List View that is displayed in the main Window.
MdiShowViewStrategy Another alternative to the ShowInMultipleWindowsStrategy. Uses multiple document interface.
See Also