[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Collapse]Application UI Manager
    [Expand]Widget View
    [Collapse]WindowsUI View
     [Collapse]Getting Started
       How To: Create a Message Box Flyout With User Control
       How To: Create a Modal Message Box Flyout
       How To: Create a Page Container
       How To: Create a PageGroup Container
       How To: Create a Pop-up Flyout
       How To: Create a SlideGroup Container
       How To: Create a SplitGroup Container
       How To: Create a TabbedGroup Container
       How To: Create a TileContainer
       How To: Pass Specific Data when Navigating Through Containers
       How To: Create Content Containers Hierarchy
      Content Containers
      Navigation Bars
      WindowsUI Buttons
      Search Panel
      Application Hierarchy and Module Navigation
     Tabbed View
     Native MDI View
     Document Selector
     Non-Document Mode
   [Expand]Deferred Load
   [Expand]Interaction with Dock Panels
   [Expand]Bar and Ribbon Merging
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[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: Create a Page Container

Expanded Prerequisites

  1. Create a Windows Forms Application.
  2. Windows UI applications are generally designed to run in full-screen mode. Modify the main form to meet these requirements. Set the FormBorderStyle property to None and the WindowState property to Maximized.
  3. Drop a DocumentManager component on the form.
  4. Change the DocumentManager's View to WindowsUI View. Click the DocumentManager's smart tag and select the Convert To WindowsUIView option.

Expanded Creating Page

  1. Run the Document Manager Designer.

  2. Switch to the designer's 'Documents' section and add a Document by clicking the corresponding button.

    After the Document is created, a TileContainer and a Tile corresponding to this Document are automatically generated. We do not need these objects and will remove them utilizing the following steps.

  3. Go to the designer's 'Tiles' page. Delete the automatically created Tile via the 'Delete Tile' button.

  4. Switch to the designer's 'Content Containers' page and delete the automatically created TileContainer via the 'Delete Container' button.

  5. Create a Page container. To do so, click the 'Add New Container' button and select 'Page' from the drop-down menu.

  6. Go to the designer's 'Navigation Tree' section. Here you can see the application's hierarchy. The topmost container is our Page. It does not yet contain any documents (its Page.Document property is empty). Add the document to the Page by dragging them from the 'Documents' panel into the 'Page 1' node. The resulting navigation tree will look like following.

  7. The Document created in step 6 is empty. In order to display content within this document, we will use the Deferred Load feature. With this feature, contents for Documents will be provided on an event. Switch to the designer's 'Views' page and select the WindowsUIView object. In the property grid, switch to events and double-click the BaseView.QueryControl event.

    Type the following code in the BaseView.QueryControl event handler.

    As you noticed, RichEditControl is used as the Document's content. To compile and run the solution, ensure that all required assemblies are included in the solution.

  8. Run the application. The result is demonstrated in the figure below.

Expanded Additional Settings

You can customize the Page's advanced settings in the designer's 'Content Containers' page. For instance you can change the Page's caption and orientation according to which its child Document is arranged. Also, to modify container's appearance settings you can switch to the designer's 'Appearance' page.

Expanded Code

This section demonstrates how to create the example in code. Because of automatic Tiles and TileContainer generation (see step 6), we have to use the WindowsUIView.QueryStartupContentContainer to set an application start-up container.

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