$npx -y skills add DevExpress/agent-skills --skill devexpress-winforms-accordionExpert skill for the DevExpress WinForms AccordionControl (DevExpress.XtraBars.Navigation.AccordionControl, DevExpress.Win.Navigation NuGet). Covers creating and populating accordion menus, data-driven element generation from collections, AccordionControlElement groups and items,
| 1 | # DevExpress WinForms Accordion Control |
| 2 | |
| 3 | `AccordionControl` is a side-navigation control that renders a hierarchical, expandable menu of groups and items. It is the recommended navigation control for new WinForms applications — more flexible than `NavBarControl`, and capable of serving as a full Hamburger Menu when `ViewType = HamburgerMenu`. |
| 4 | |
| 5 | Groups (`ElementStyle.Group`) are expandable containers. Items (`ElementStyle.Item`) are clickable leaves that can optionally embed arbitrary WinForms controls inside an expandable content container. The hierarchy is unlimited in depth. |
| 6 | |
| 7 | The control lives in the `DevExpress.XtraBars.Navigation` namespace and ships with the `DevExpress.Win.Navigation` NuGet package. |
| 8 | |
| 9 | ## When to Use This Skill |
| 10 | |
| 11 | - Setting up a side navigation menu in a WinForms application |
| 12 | - Adding groups, items, and content containers to an `AccordionControl` |
| 13 | - Generating menu items programmatically from data (lists, database queries, configuration) |
| 14 | - Switching the control to Hamburger Menu style and configuring display modes |
| 15 | - Customizing item headers, icons, appearance, and HTML-CSS templates |
| 16 | - Enabling search / filter functionality in the navigation menu |
| 17 | - Choosing between `AccordionControl`, `NavBarControl`, and Hamburger Menu style |
| 18 | - Integrating with `NavigationFrame`, `RibbonForm`, or `FluentDesignForm` |
| 19 | |
| 20 | ## Prerequisites & Installation |
| 21 | |
| 22 | ### NuGet Package |
| 23 | |
| 24 | ``` |
| 25 | DevExpress.Win.Navigation |
| 26 | ``` |
| 27 | |
| 28 | ```powershell |
| 29 | Install-Package DevExpress.Win.Navigation |
| 30 | ``` |
| 31 | |
| 32 | ### Required Namespace Imports |
| 33 | |
| 34 | ```csharp |
| 35 | using DevExpress.XtraBars.Navigation; |
| 36 | using DevExpress.XtraEditors; // XtraForm |
| 37 | using DevExpress.XtraBars.Ribbon; // RibbonForm (optional) |
| 38 | ``` |
| 39 | |
| 40 | ### Host Form |
| 41 | |
| 42 | Always host `AccordionControl` on `XtraForm` (or `RibbonForm` / `FluentDesignForm`) — not on plain `Form` — to get correct skin-aware rendering. |
| 43 | |
| 44 | ## Before You Start — Ask the Developer |
| 45 | |
| 46 | 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. |
| 47 | |
| 48 | 1. Is the navigation structure fixed at design time, or generated from data (list/database)? |
| 49 | 2. Should the sidebar always be visible, or should it collapse to an icon strip (Hamburger Menu)? |
| 50 | 3. Do items need embedded controls (DatePicker, ToggleSwitch, lists) inside them? |
| 51 | 4. Does the app have a `RibbonControl` that should share a title bar with the accordion? |
| 52 | 5. How deep is the hierarchy (2 levels → consider `NavBarControl`; 3+ → AccordionControl)? |
| 53 | 6. Is there a search/filter requirement for the navigation items? |
| 54 | |
| 55 | ## Documentation & Navigation Guide |
| 56 | |
| 57 | ### Getting Started — Setup and Installation |
| 58 | Refer to [references/getting-started.md](references/getting-started.md) (.NET 8+) or [references/getting-started-dotnet-fw.md](references/getting-started-dotnet-fw.md) (.NET Framework 4.x) |
| 59 | When you need to: |
| 60 | - Add `AccordionControl` to a project for the first time |
| 61 | - Choose the right host form type (`XtraForm`, `RibbonForm`, `FluentDesignForm`) |
| 62 | - Integrate with `RibbonForm.NavigationControl` |
| 63 | |
| 64 | ### Data Binding and Populating Items |
| 65 | Refer to [references/data-binding.md](references/data-binding.md) |
| 66 | When you need to: |
| 67 | - Understand that `AccordionControl` has no `DataSource` — items are always added manually |
| 68 | - Generate items from a `List<T>`, database result, or configuration |
| 69 | - Use `BeginUpdate()` / `EndUpdate()` for bulk population |
| 70 | - Use `Tag` |