An abstract class that serves as the base class for the Show View Strategy classes.
public abstract class ShowViewStrategyBase : IDisposable
Public MustInherit Class ShowViewStrategyBase Implements IDisposable
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:
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:
Another option is to display the Detail View in the same Window:
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.
|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.|