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

MdiShowViewStrategy Class

A Show View Strategy that uses a multiple document interface and can be used as an alternative to the default ShowInMultipleWindowsStrategy.

Namespace: DevExpress.ExpressApp.Win

Assembly: DevExpress.ExpressApp.Win.v18.2.dll

Declaration

public class MdiShowViewStrategy :
    WinShowViewStrategyBase

Remarks

The built-in MainForm Template includes a DocumentManager component . The DocumentManager is a non-visual object that displays content via Documents. Documents can be presented in different ways based on the DocumentManager’s view. There are two Document Manager view types: NativeMdiView and TabbedView. The MdiShowViewStrategy uses the DocumentManager for showing XAF Views. Its MdiShowViewStrategy.MdiMode property value is used to set the DocumentManager‘s view. The following values are possible:

  • When the MdiMode property is set to MdiMode.Tabbed, the Document Manager uses the Tabbed MDI view. This means that Views are invoked in separate tabs:

    MdiModeTabbed

    In this mode, the MdiShowViewStrategy supports docking. Users can dock, group and arrange tabs or windows as desired. You can also Shift+Click a navigation item or an object reference, and the corresponding View will be invoked in a new window. Pressing Ctrl+Tab activates a Document Selector. It allows you to switch between Views easily. To learn more about the capabilities that are provided in the Document Manager together with a DockManager, refer to the Interaction with Dock Panels topic. In addition, try the Ribbon, Toolbar & Docking | Tutorials | Document Manager Demo supplied with the DXperience installation. The MdiShowViewStrategy saves the arrangement of the open tabs when closing the application and restores them when re-opening the application. For optimal performance of the tabbed mode, delayed loading is implemented for restored tabs. This means that only controls of the active tab are created on application startup. At the same time, you can refuse saving the tabs layout by setting the RestoreTabbedMdiLayout property of the Options node to false in the Model Editor.

    Note

    In the Tabbed mode, bar items from a child form are merged with bar items from a parent form. Merging is performed based on captions of the items (see MDI Merging). When localizing, ensure that you specify different localized values for Action Container captions. Otherwise, unwanted Action duplication may occur.

  • When the MdiMode property is set to MdiMode.Standard, the Document Manager uses the Native MDI view. This means that Views are invoked in separate Windows:

    MdiModeStandard

    Note

    Model Editor prohibits using the Standard mode together with the Ribbon interface. The Document Manager has not been thoroughly tested for this configuration as we have found it much less usable than others. This configuration can potentially lead to errors. In conjunction with the Ribbon, the Tabbed mode provides better usability.

You can access the DocumentManager to customize its default settings. To do this, cast the MainForm Template by the IDocumentsHostWindow interface and get the value of its DocumentManager property. To see an example, refer to the How to: Access the Document Manager topic.

By default, XAF Windows Forms applications use the ShowInMultipleWindowsStrategy. To use another Strategy, specify the Application Model‘s IModelOptionsWin.UIType property of the Application | Options node. Alternatively, you can manually instantiate the required Strategy and assign it to the XafApplication.ShowViewStrategy property.

For general information on Show View Strategies, refer to the ShowViewStrategyBase class description.

Inheritance

See Also