$npx -y skills add DevExpress/agent-skills --skill devexpress-winforms-ribbon-and-barsDevExpress WinForms Ribbon (RibbonControl) and traditional Bars (BarManager + Bar) — Office-style ribbon UIs or classic main-menu/toolbar/status-bar UIs. Covers the RibbonForm host requirement, the items/links architecture (BarItem and BarItemLink: BarButtonItem, BarCheckItem, Ba
| 1 | # DevExpress WinForms Ribbon and Bars |
| 2 | |
| 3 | `DevExpress.XtraBars` is one library that ships both Ribbon UI (`RibbonControl` + `RibbonForm` + `RibbonStatusBar` + `BackstageViewControl`) and the classic Bars system (`BarManager` + `Bar` + `BarDockControl`). Both stacks share the same items/links architecture — every command is a non-visual `BarItem` (`BarButtonItem`, `BarCheckItem`, `BarEditItem`, `BarSubItem`, `BarStaticItem`, `BarHeaderItem`, `RibbonGalleryBarItem`, …) and every visible button/dropdown is a `BarItemLink` referencing one of those items. The same `BarButtonItem` can appear in a ribbon page group, the QAT, the page header area, a popup menu, and a status bar at once; clicking any link fires the item's one `ItemClick` handler. |
| 4 | |
| 5 | > **WinForms vs WPF terminology — three corrections to the prompt**: |
| 6 | > |
| 7 | > 1. The host form for a Ribbon must inherit from **`DevExpress.XtraBars.Ribbon.RibbonForm`** (not `ThemedWindow` — that is WPF). `RibbonForm` derives from `XtraForm` and integrates the ribbon into the non-client area for QAT + caption bar items. |
| 8 | > 2. There is no separate **`MainMenuControl` / `StatusBarControl` / `ToolBarControl`** in WinForms — those names belong to the WPF Bars stack. In WinForms, `BarManager` hosts a collection of `Bar` objects; the bar assigned to `BarManager.MainMenu` plays the main-menu role, `BarManager.StatusBar` plays the status-bar role, and any other `Bar` with `DockStyle = Top/Bottom/Left/Right` is a toolbar. |
| 9 | > 3. There is **no WinForms-native MVVM framework** in DevExpress on par with WPF's. The cross-platform `DevExpress.Mvvm` package (separately installable) does work in WinForms — you can use `BindableBase`, `DelegateCommand`, and `INotifyPropertyChanged` with `BindingSource` to data-bind `BarItem.Caption`/`Enabled`/`Visible`/`Down`, and a Bind-style helper to wire `ItemClick` to a `ICommand`. This is the pragmatic substitute for ribbon MVVM in WinForms. |
| 10 | |
| 11 | ## When to Use This Skill |
| 12 | |
| 13 | (The detailed API surface per task is in the Navigation Guide below.) |
| 14 | |
| 15 | - Building an Office-style ribbon UI — `RibbonControl` on a `RibbonForm`, with `RibbonStatusBar` and an optional `BackstageViewControl`/`ApplicationMenu`. |
| 16 | - Building a classic main-menu / toolbar / status-bar UI — `BarManager` with docked `Bar`s. |
| 17 | - Choosing the right command type (button, check, toggle, sub-menu, editor, gallery, split button) and placing one command in many locations with per-link overrides. |
| 18 | - Setting item visuals and icons (`RibbonStyle`, `ButtonStyle`, `ImageOptions.SvgImage`/`ImageUri`). |
| 19 | - Data-binding items to a view-model with `DevExpress.Mvvm` or a plain `BindingSource`. |
| 20 | - Customizing appearance via skins, `RibbonControl.RibbonStyle`, and `AppearanceObject`s — and knowing when you must drop to `CustomDrawItem`. |
| 21 | - Merging child-MDI ribbons and bars into the parent. |
| 22 | - Assembling the ribbon structure: page categories (regular + contextual), pages, groups, Quick Access Toolbar, page-header/caption items, status bar, and the application/backstage menu. |
| 23 | |
| 24 | ## Prerequisites & Installation |
| 25 | |
| 26 | ### NuGet Packages |
| 27 | |
| 28 | | Package | Contents | |
| 29 | |---|---| |
| 30 | | `DevExpress.Win.Navigation` | `DevExpress.XtraBars.v*.dll` — `RibbonControl`, `RibbonForm`, `RibbonStatusBar`, `BarManager`, `Bar`, all `BarItem*`, `BackstageViewControl`, `ApplicationMenu`, `RecentItemControl`, `RadialMenu`, galleries. Also brings `DevExpress.Utils`, `DevExpress.XtraEdito |