$npx -y skills add DevExpress/agent-skills --skill devexpress-winforms-tab-controlExpert skill for the DevExpress WinForms XtraTabControl (DevExpress.XtraTab, DevExpress.Win.Navigation NuGet). Build tabbed UIs that organize controls into pages — add/remove XtraTabPage pages via the TabPages collection or designer, populate pages, position and orient headers (H
| 1 | # DevExpress WinForms Tab Control |
| 2 | |
| 3 | `XtraTabControl` is a container that organizes other controls into pages. Each page is an `XtraTabPage` with a clickable header; the active page fills the control's body. Use it to build a tabbed UI in a local area of a form — a settings dialog, a multi-section editor, a property pane. |
| 4 | |
| 5 | Pages live in the `XtraTabControl.TabPages` collection. The active page is `XtraTabControl.SelectedTabPage`. The control lives in the `DevExpress.XtraTab` namespace and ships with the `DevExpress.Win.Navigation` NuGet package. |
| 6 | |
| 7 | > **Use Cases and Alternatives**: `XtraTabControl` is for organizing controls into pages in a fixed, local area — users **cannot** undock or rearrange pages. If you need a true MDI / document interface (floating, draggable, on-demand-loaded documents), use the [Application UI Manager / DocumentManager](https://docs.devexpress.com/content/WindowsForms/11359?md=true) or the simpler [XtraTabbedMdiManager](https://docs.devexpress.com/content/WindowsForms/5486?md=true) instead. For a browser-like form with page headers in the title bar, see [Tabbed Form](https://docs.devexpress.com/content/WindowsForms/115183?md=true). |
| 8 | |
| 9 | ## When to Use This Skill |
| 10 | |
| 11 | - Adding a tabbed page UI to a form (settings, multi-section editor, property pane) |
| 12 | - Adding, removing, or reordering `XtraTabPage` pages in code or the designer |
| 13 | - Placing controls onto tab pages |
| 14 | - Positioning / orienting page headers (top, bottom, left, right; horizontal or vertical text) |
| 15 | - Wrapping headers into multiple rows when they don't fit (`MultiLine`) |
| 16 | - Showing Prev / Next / Close buttons in the header panel, or per-page Close buttons |
| 17 | - Responding to page selection (`SelectedPageChanged`/`SelectedPageChanging`) or close (`CloseButtonClick`) events |
| 18 | - Hiding headers and implementing wizard-style custom page navigation |
| 19 | - Adding icons or custom buttons to page headers |
| 20 | |
| 21 | ## Prerequisites & Installation |
| 22 | |
| 23 | ### NuGet Package |
| 24 | |
| 25 | ``` |
| 26 | DevExpress.Win.Navigation |
| 27 | ``` |
| 28 | |
| 29 | ```powershell |
| 30 | Install-Package DevExpress.Win.Navigation |
| 31 | ``` |
| 32 | |
| 33 | This package ships `DevExpress.XtraEditors.v26.1.dll`, which contains the `DevExpress.XtraTab` namespace. |
| 34 | |
| 35 | ### Required Namespace Imports |
| 36 | |
| 37 | ```csharp |
| 38 | using DevExpress.XtraTab; // XtraTabControl, XtraTabPage, event args |
| 39 | using DevExpress.XtraTab.ViewInfo; // ClosePageButtonEventArgs, CustomHeaderButtonEventArgs |
| 40 | using DevExpress.XtraTab.Buttons; // CustomHeaderButton (custom header buttons only) |
| 41 | using DevExpress.XtraEditors; // XtraForm, SimpleButton |
| 42 | ``` |
| 43 | |
| 44 | ### Host Form |
| 45 | |
| 46 | Host `XtraTabControl` on `XtraForm` (or `RibbonForm` / `FluentDesignForm`) — not a plain `Form` — so the control and its pages render with the correct skin. Enable skinning at startup (`WindowsFormsSettings.LoadApplicationSettings()` / `SkinManager.EnableFormSkins()` in `Program.Main`). |
| 47 | |
| 48 | ## Before You Start — Ask the Developer |
| 49 | |
| 50 | 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. |
| 51 | |
| 52 | 1. **Static or dynamic pages?** Fixed set authored in the designer, or built/added from data at runtime? |
| 53 | 2. **How many pages, and what if they don't fit?** Many headers → enable `MultiLine` (wrap) or header **Prev/Next** buttons (scroll). |
| 54 | 3. **Should users close pages?** If yes, decide between per-page Close buttons (`ClosePageButtonShowMode`) and |