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
    [Collapse]Widget View
      Stack Layout Mode
      Table Layout Mode
      Flow Layout Mode
      Free Layout Mode
    [Expand]WindowsUI View
     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]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

Stack Layout Mode

When in Stack Layout mode, documents are organized into Stack Groups (StackGroup objects). You can think of Stack Groups as rows or columns of cards. Multiple Stack Groups can be created, allowing you to create multiple rows/columns of cards. The direction in which cards are arranged within Stack Groups is specified by the WidgetView.Orientation property.

Stack Groups are measured in either absolute or relative values. To set the width (for vertical oriented Widget View) or height (for horizontal oriented View) of a Stack Group, access its Length property that returns an object of the Length type. This object provides two properties: Length.UnitType and Length.UnitValue.

  • If the Length.UnitType property is set to Pixel, an integer value stored within the Length.UnitValue property is the width (height) of the related Stack Group in pixels. The following figure illustrates three Stack Groups with lengths of 60, 80 and 100 pixels. The View is oriented horizontally.

  • If the Length.UnitType property equals Star, an integer value stored within the Length.UnitValue property is a multiplier that specifies how much wider or narrower this Group is compared to other star-measured Groups. For instance, at the figure below a vertically-oriented Widget View contains three star-measured Stack Groups. Group lengths are set to 1, 2 and 3 respectively, so the second group is twice and the third group is three times as wide as the first group. This ratio persists when an end-user resizes the parent form.

A star-measured Stack Group does not have a constant length. Instead, its length adapts to the available space. For this reason, when an end-user resizes the parent form, Stack Groups can become narrower, clipping the content of their Documents. If a document content does not have a MinimumSize property specified, Groups can be resized until the content is no longer displayed. Otherwise, if a document content has a specified MinimumSize, Groups can only be resized until they reach this size. If they are resized any further, the Stack Group and its Documents will be hidden. You can expand the following sections to see animations that illustrate both of these behaviors.

Expanded Resizing Stack Groups without the content's minimum size specified

Expanded Resizing Stack Groups with the content's minimum size specified

When a star-measured Stack Group is hidden, its IsVisible property is set to false, and the VisibilityChanged event is raised. Pixel-measured Stack Groups are always visible.

End-users can drag widgets from one Stack Group to another. The number of child documents within a Stack Group cannot exceed the number specified by the IStackGroupDefaultProperties.Capacity property. Dragging a document fires the WidgetView.BeginDragging, WidgetView.Dragging and WidgetView.EndDragging events in sequence.

It is also possible to swap entire groups by dragging their captions. To enable this behavior, set the IStackGroupProperties.AllowDragging property to true and provide caption strings for your Stack Groups by using the StackGroup.Caption property.

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