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
   [Expand]Views
    Documents
   [Expand]Deferred Load
   [Expand]Interaction with Dock Panels
   [Expand]Bar and Ribbon Merging
   [Collapse]Examples
     How To: Create Custom Document Actions
     How to: Display Documents Using a Native MDI
     How to: Display Documents Using a Tabbed UI
     How To: Populate the Widget View in Code
  [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]ASP.NET Core 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]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How To: Populate the Widget View in Code

Show Me

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

This example demonstrates how to create and customize the WidgetView at runtime. In this example, the WidgetView contains two StackGroups, which host three Documents. Each Document displays different content in its normal and maximized states. StackGroups have relative lengths (their Length.UnitType properties are set to Star), which allows them to dynamically resize whenever the parent form resizes.

Note

1. When creating the Widget View-based application at runtime, do not specify the DocumentManager.MdiParent property manually. Otherwise, widgets will not be displayed.

2. Be sure to set the DocumentManager.ContainerControl property after the View is created and assigned to the DocumentManager.View property.

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