devexpress/agent-skills/devexpress-winforms-layout
Claude Code and agent skill by devexpress/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
DevExpress WinForms Layout Management — form layout and docking controls: LayoutControl (free/flow/table layout modes, groups, tabbed groups, size constraints, runtime customization), DataLayoutControl (data-source-driven auto-generated editor layout, RetrieveFields, DataAnnotations), DockManager with DockPanel (VS-style docking, floating panels, auto-hide, tab groups, DockingStyle, DockAsTab), StackPanel, and TablePanel (Absolute/AutoSize/Relative sizing, RowSpan/ColumnSpan). Covers NuGet (Dev…
Install
npx vskill@latest install devexpress/agent-skills/devexpress-winforms-layoutSKILL.md
DevExpress WinForms Layout Management
DevExpress WinForms ships a family of layout controls that cover form composition scenarios — from responsive data-entry forms to IDE-style dockable tool windows. The main controls ship in the `DevExpress.Win.Navigation` NuGet package; the lightweight StackPanel/TablePanel live in `DevExpress.Utils` (pulled in transitively).
| Control | Class | Purpose | |
|---|---|---|---|
LayoutControl | DevExpress.XtraLayout.LayoutControl | Responsive data forms with auto-alignment, groups, tabs, and runtime customization | |
DataLayoutControl | DevExpress.XtraDataLayout.DataLayoutControl | Auto-generates editor layout from a bound data source | |
DockManager | DevExpress.XtraBars.Docking.DockManager | Visual Studio-style dockable, floatable, auto-hiding tool panels | |
StackPanel | DevExpress.Utils.Layout.StackPanel | Lightweight directional flow container (ships in DevExpress.Utils) | |
TablePanel | DevExpress.Utils.Layout.TablePanel | Lightweight rows-and-columns grid container (ships in DevExpress.Utils) |
Common misconception: There is no separateFlowLayoutControlorTableLayoutControlclass. Flow Layout and Table Layout are modes (LayoutMode) on aLayoutControlGroupinsideLayoutControl.
Author layouts in the form's `*.Designer.cs` by default. Generate the layout insideInitializeComponent(), the same way the Visual Studio WinForms designer serializes it — not in the form constructor body. Only build a layout in runtime code when the user explicitly asks for it or the structure is genuinely dynamic/data-driven. See rule 1 in Constraints & Rules and the worked example in references/getting-started.md. (For a form generated from a table or class, preferDataLayoutControl+RetrieveFields()over a hand-builtLayoutControl.)
When to Use This Skill
- Add a
LayoutControlto a form and arrange editors with labels, groups, tabbed groups, and size constraints. - Use
DataLayoutControlto auto-generate a bound edit form from a DataTable or business object. - Add a
DockManagerto enable VS-style dockable panel UI. - Use
StackPanelorTablePanelas lightweight layout containers. - Save and restore any layout to XML, JSON, stream, or registry; or manage multiple layout slots with
WorkspaceManager.
Prerequisites & Installation
Host form: DevExpress.XtraEditors.XtraForm (or RibbonForm).
Namespaces:
Before You Start — Ask the Developer
If the host agent has a structured question-asking tool available, use it to ask these questions one at a time with clear options — for example, Claude Code's AskUserQuestion tool or GitHub Copilot's askQuestions tool. If no such tool is available, ask the questions directly in the chat response before generating code.
- Control type: Which layout control is needed —
LayoutControl(manual, labeled form),DataLayoutControl(data-driven auto-generated form — the default when the form is built from a table or class),DockManager(VS-style panels), orStackPanel/TablePanel(lightweight containers)? - Layout structure: How many groups? Do groups need tabs (
TabbedControlGroup)? Is a flat list of editors sufficient? - Layout mode (for
LayoutControl): Free (default), Flow (items wrap in rows), or Table (grid with row/column indexes)? - Data source (for
DataLayoutControl): What type —DataTable,BindingSource, business object (POCO)? Are[DataAnnotations]attributes on the business object? - Runtime customization: Should end-users be allowed to rearrange or hide editors at runtime?
- Persistence: Should the layout be saved between sessions? One layout slot or multiple (named workspaces)?
- DockManager target: Will panels contain specific controls (grid, property editor, output log)? Should panels be closeable, floatable, auto-hideable?
Documentation & Navigation Guide
Getting Started
Refer to references/getting-started.md (.NET 8+) or references/getting-started-dotnet-fw.md (.NET Framework 4.x) When you need to: install DevExpress.Win.Navigation, reference the correct assemblies and namespaces, author a layout in the form's *.Designer.cs (the default), and write the minimal boilerplate for each control type.
Layout Control Variants — When to Use Which
Refer to references/layout-controls.md When you need to: choose between LayoutControl, DataLayoutControl, DockManager, StackPanel, and TablePanel; understand the decision criteria and the differences; clarify naming confusion (FlowLayoutControl/TableLayoutControl vs LayoutMode).
Building Layouts in Code
Refer to references/building-layouts.md When you need to: construct a LayoutControl hierarchy (AddItem, AddGroup, AddTabbedGroup, EmptySpaceItem, SplitterItem), enable Flow or Table layout mode on a group, set size constraints, hide/show items, dock panels with DockManager (AddPanel, DockTo, DockAsTab), or configure StackPanel/TablePanel rows/columns. (Prefer authoring in the *.Designer.cs file — see Getting Started — unless the layout is built dynamically at runtime.)
Saving and Restoring Layout
Refer to references/saving-restoring-layout.md When you need to: persist layout state to XML/JSON/stream/registry for LayoutControl or DockManager; control what is serialized via OptionsSerialization; manage multiple named layout slots with WorkspaceManager; implement Form_Load restore and FormClosing save patterns; reset to default layout using a cached MemoryStream.
Quick Start
Default to the designer. For a normal form, author theLayoutControl/DockManagerand its items inMainForm.Designer.cs(InitializeComponent) so the form stays editable in the WinForms designer — see references/getting-started.md for the worked*.Designer.csexample. The runtime-code snippets below show the same API for the cases where you build the layout dynamically (or the user explicitly asks for code) — do not put this in the form constructor body of a designer-backed form.
LayoutControl with Two Groups (runtime / dynamic)
DockManager with Three Panels
Persist DockManager Layout
Key API Surface
| Area | Member | Notes | |
|---|---|---|---|
LayoutControl | Root | The root LayoutControlGroup; all items are descendants | |
LayoutControl | AddItem(caption, control) | Adds a control with a label; returns LayoutControlItem | |
LayoutControl | BeginUpdate() / EndUpdate() | Batch updates to suppress repaints | |
LayoutControlGroup | AddGroup() | Adds a nested LayoutControlGroup | |
LayoutControlGroup | AddTabbedGroup() | Adds a TabbedControlGroup | |
LayoutControlGroup | LayoutMode | LayoutMode.Regular (free), Flow, Table — selects the group's layout mode | |
LayoutControlGroup | DefaultLayoutType | LayoutType.Vertical (default) / Horizontal — default orientation for newly added items, not the layout mode | |
LayoutControlItem | TextVisible | Hide the item's label | |
LayoutControlItem | Visibility | LayoutVisibility.Always / Never / OnlyInCustomization / OnlyInRuntime | |
LayoutControlItem | MinSize / MaxSize | Size constraints | |
LayoutControlItem | SizeConstraintsType | Default or Custom | |
DataLayoutControl | DataSource / DataMember | Bind to data | |
DataLayoutControl | RetrieveFields() | Auto-generate layout from data source | |
DockManager | Form | The container form (required) | |
DockManager | AddPanel(DockingStyle) | Create + dock a new panel | |
DockPanel | DockTo(style) / DockTo(panel, style, index) | Dock to form or adjacent panel | |
DockPanel | DockAsTab(targetPanel) | Merge into a tabbed group | |
DockPanel | Visibility | DockVisibility.Visible / Hidden / AutoHide | |
DockPanel | Options | AllowFloating, ShowCloseButton, ShowAutoHideButton | |
StackPanel | LayoutDirection | StackPanelLayoutDirection.LeftToRight (default), RightToLeft, TopDown, BottomUp | |
TablePanel | Rows / Columns | TablePanelRow / TablePanelColumn collections | |
TablePanel | SetCell(control, row, column) | Add the control to tablePanel.Controls first, then assign it to a row+column cell; use SetRowSpan / SetColumnSpan for spans | |
| Save/Restore | SaveLayoutToXml(path) | Available on LayoutControl and DockManager | |
| Save/Restore | RestoreLayoutFromXml(path) | Available on the same controls | |
| Save/Restore | SaveLayoutToJson(stream) | Available on LayoutControl, DockManager | |
| Save/Restore | OptionsSerialization | LayoutControl-specific persistence options | |
| Workspaces | WorkspaceManager.CaptureWorkspace(name) | Capture current state of all registered controls into the Workspaces collection | |
| Workspaces | WorkspaceManager.ApplyWorkspace(name) | Apply a named workspace |
Troubleshooting
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/dx-winforms/skills/devexpress-winforms-layout/SKILL.md
Popularity
- Repository stars
- 67
- Repository forks
- 12
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/devexpress/agent-skills/devexpress-winforms-layout)