[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Expand]Controls and Libraries
 [Collapse]Scaffolding Wizard
   Getting Started
  [Expand]Data Access Layer
   UI Generation
    How to: Affect Auto-Generated Columns and Edit Fields at the Data Model Level
    How to: Create a Custom Filter
    How to: Add a New Detail Collection
    How to: Show Validation Errors when IDataErrorInfo is Used
    How to: Show Detail Views in Separate Windows
    How to: Manage Document Properties and Open Them Manually
    How to: Implement Many-to-many Relationships Editing
    Entity Names Autogeneration
    How to: Use Projections to Create Custom Queries and Optimize Performance
    How To: Improve Performance by Using the Instant Feedback Mode
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Show Detail Views in Separate Windows

This tutorial is based on the following sample project.


A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T111354.

You may want to show detail views in separate windows instead of tabs. To accomplish this, let's review how tabs are created.

CollectionViewModelBase uses the IDocumentManagerService interface to create abstract documents that represent detail views at runtime. The implementation of IDocumentManagerService defines the way these views are represented in the UI. By default, the Tabbed MDI View Scaffolding Wizard generates the DepartmentContextView that uses the TabbedDocumentUIService to represent child Views in separate tabs within the DocumentGroup control.

All generated collection views already contain the WindowedDocumentUIService that shows views in separate windows. The YieldToParent property is set to true, which means that the CollectionViewModel will search its parent view models for the instance of the IDocumentManagerService interface.

So, all we need to do is to make the collection view model use this instance instead of the instance from the parent DepartmentContextViewModel is to set this property to false.

Let's also tweak the WindowedDocumentUIService inside the CourseCollectionView to make its windows dialog-like and use the DXRibbonWindow as we have the ribbon in our detail views:

The course detail editing forms are now shown in separate windows:

To change the windows model so that only one detail form is shown at a time, set the WindowedDocumentUIService.DocumentShowMode property to Dialog.

Is this topic helpful?​​​​​​​