Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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
   [Collapse]Views
    [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
      Windows UI Guidelines
      Content Containers
      Navigation Bars
      WindowsUI Buttons
      Flyouts
      Search Panel
      Designer
      Hierarchy and Screens
      Navigating Through Containers
     Tabbed View
     Native MDI View
     Document Selector
     Non-Document Mode
    Documents
   [Expand]Deferred Load
   [Expand]Interaction with Dock Panels
   [Expand]Bar and Ribbon Merging
   [Expand]Examples
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How To: Create a PageGroup 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 Group

  1. Run the Document Manager Designer:

  2. Select the designer's 'Elements' page, switch to its 'Documents' section and add 2 Documents by clicking a corresponding button.

    After the Documents are created, a TileContainer and two Tiles corresponding to these Documents are automatically generated. We do not need these objects and will remove them utilizing the following steps.
  3. Switch to the 'Tiles' page. Delete the automatically created Tiles by clicking the 'Delete Tile' button.

  4. Finally, remove the automatically created TileContainer as well.

  5. Create a PageGroup container. To do so, click the 'Add New Container' button and select 'PageGroup' 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 PageGroup. It does not yet contain any documents (its inherited DocumentGroup.Items collection is empty). Add documents to the PageGroup by dragging them from the 'Documents' panel into the 'Items' node.

    The resulting navigation tree will look like following.

  7. The Documents created in step 6 are empty. In order to display content within these documents, we will use the Deferred Load feature. With this feature, contents for Documents will be provided via 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, RichEditControls are used as Documents' 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 PageGroup's advanced settings in the designer's 'Content Containers' page. For instance you can change the PageGroup's caption and animation effects that occur when switching between Documents. To do so, go to the mentioned designer's section and set the IDocumentSelectorDefaultProperties.SwitchDocumentAnimationMode property to the desired value. Additionally, you can specify the IDocumentSelectorDefaultProperties.SwitchDocumentAnimationFrameInterval and IDocumentSelectorDefaultProperties.SwitchDocumentAnimationFramesCount properties to set the desired animation quality and duration.

You can also set appearance options in 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.

How would you rate this topic?​​​​​​​