Install
$ agentstack add skill-devexpress-agent-skills-devexpress-wpf-ribbon-and-bars ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
DevExpress WPF Ribbon and Bars
DevExpress.Xpf.Ribbon and DevExpress.Xpf.Bars provide an Office-style command surface for WPF: a tabbed RibbonControl with categories/pages/groups, standalone bar controls (MainMenuControl, ToolBarControl, StatusBarControl), the legacy BarManager aggregator for multi-bar layouts, popup menus, status bars, and a rich set of bar items (BarButtonItem, BarCheckItem, BarSplitButtonItem, BarSubItem, BarEditItem, etc.) that work uniformly across Ribbon, bars, and menus.
> ThemedWindow is required, not a regular System.Windows.Window. The Ribbon control needs ThemedWindow to render correctly into the title bar, support WindowKind="Ribbon" integration, and provide MDI merging hooks. Convert plain Window → ThemedWindow before adding Ribbon UI.
When to Use This Skill
Use this skill when you need to:
- Build a Microsoft Office–style Ribbon UI in a WPF window
- Add toolbars, main menus, or status bars (modern way:
ToolBarControl/MainMenuControl/StatusBarControl; legacy:BarManagerwithBarobjects) - Define bar items (buttons, check buttons, sub-menus, editors, separators, galleries)
- Wire bar item actions to MVVM commands or code-behind events
- Populate Ribbon pages / groups / bars from a ViewModel collection
- Configure the Quick Access Toolbar, Application Menu, BackstageView, or Ribbon Status Bar
- Set glyphs and switch between large/small icon display modes
- Customize bar/ribbon element appearance via standard WPF properties and triggers
- Merge child-window bars/ribbons into the parent in an MDI layout
Prerequisites & Installation
NuGet Packages
| Package | Purpose | |---------|---------| | DevExpress.Wpf.Core | ThemedWindow, themes, shared infrastructure | | DevExpress.Wpf.Ribbon | RibbonControl, RibbonPageCategory, RibbonPage, RibbonPageGroup, BackstageViewControl, RibbonStatusBarControl. Includes DevExpress.Xpf.Bars. | | DevExpress.Wpf.Docking | Only if you need MDI merging via DockLayoutManager |
DevExpress.Wpf.Ribbon brings DevExpress.Wpf.Bars transitively — you don't install Bars separately.
.NET (6/7/8+)
dotnet add package DevExpress.Wpf.Ribbon
Add to .csproj:
net8.0-windows
true
.NET Framework (4.6.2+)
Same NuGet packages, or reference the installed assemblies directly (DevExpress.Xpf.Ribbon.v.dll, DevExpress.Xpf.Bars.v.dll).
All DevExpress packages must share a version. A valid DevExpress license is required.
Before You Start — Ask the Developer
- Target framework: .NET 8+, .NET 6/7, or .NET Framework 4.x?
- Ribbon or bars: Office-style Ribbon, classic toolbar/menu/status bar layout, or both? Don't mix
RibbonControlandBarManagerin the same window — pick one paradigm. - Window: Is the main window already a
ThemedWindow? If not, it must be converted before adding Ribbon UI. - Bar layout: For non-ribbon UIs, prefer standalone
ToolBarControl/MainMenuControl/StatusBarControlover the olderBarManager. UseBarManageronly when you need centralized item sharing across many bars. - MVVM: Define items declaratively in XAML, or generate from a ViewModel collection? See [items-and-links.md § MVVM](references/items-and-links.md).
- MDI merging: Are there child documents/panels that contribute their own bars/ribbons to merge into the parent?
Component Overview
XAML Namespaces
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
| Prefix | Use for | |---|---| | dxr: | RibbonControl, RibbonPageCategory, RibbonPage, RibbonPageGroup, RibbonStatusBarControl, BackstageViewControl, BarButtonGroup, RibbonGalleryBarItem, ApplicationMenu | | dxb: | All BarItem types and links, ToolBarControl, MainMenuControl, StatusBarControl, BarContainerControl, BarManager, PopupMenu | | dx: | ThemedWindow, themes, DXMessageBoxService |
Items vs Links (Critical Concept)
BarItem— the item definition (button, check, split, sub-item, edit, static, etc.). Owns content, glyph, command/click handler.BarItemLink— a reference to aBarItem. Lets the sameBarItemappear in multiple bars / menus / ribbon groups simultaneously.
In simple cases (item defined directly inside its bar), the link is created implicitly. In BarManager layouts (items defined in BarManager.Items, referenced from bars), you typically write BarButtonItemLink BarItemName="bPaste" explicitly. See [items-and-links.md](references/items-and-links.md).
Documentation & Navigation Guide
Getting Started
Refer to [references/getting-started.md](references/getting-started.md)
When you need to:
- Set up a new WPF project with Ribbon / bars
- Add required NuGet packages
- Convert a plain
WindowtoThemedWindow(required for Ribbon) - Place the first
RibbonControland configureWindowKind="Ribbon" - Pick a
RibbonStyle(Office2007 / Office2010 / Office2019 / OfficeSlim / TabletOffice)
Items and Item Links
Refer to [references/items-and-links.md](references/items-and-links.md)
When you need to:
- Add
BarButtonItem,BarCheckItem,BarSplitButtonItem,BarSubItem,BarEditItem, separators - Understand the difference between item and link (and when to use each)
- Set glyphs (
Glyph/LargeGlyph/MediumGlyph), display modes (Default,Content,ContentAndGlyph), alignment - Wire items to MVVM commands (
Command/CommandParameter) orItemClickevents - Generate items dynamically from a ViewModel collection (
ItemLinksSource+ templates)
Appearance Customization
Refer to [references/appearance-customization.md](references/appearance-customization.md)
When you need to:
- Customize background / foreground / borders / padding via standard WPF properties
- Use
BarItem.Triggersfor conditional appearance (state-based) - Switch Ribbon paint styles (
Office2019,OfficeSlim,TabletOffice, etc.) - Understand what cannot be customized via properties / triggers (template-only territory)
Merging
Refer to [references/merging.md](references/merging.md)
When you need to:
- Merge a child window's bars / ribbons into the parent window automatically (MDI mode)
- Trigger merge / unmerge manually (
Bar.Merge/Bar.UnMerge,RibbonControl.UnMerge) - Tune merge behavior via
MergeTypeandMergeOrderon items, pages, groups - Disable merging for a specific panel or layout
- Merge a
ThemedWindow's toolbar items with a child panel's bars
Bar Varieties and Layout
Refer to [references/bars-and-layout.md](references/bars-and-layout.md)
When you need to:
- Decide between standalone
ToolBarControl/MainMenuControl/StatusBarControl(recommended) vsBarManager+Bar(legacy) - Place a bar at the top / left / right / bottom of a window using
BarContainerControl - Allow bars to float at runtime
- Use the
BarManagerfor centralized multi-bar layouts
Ribbon Structure
Refer to [references/ribbon-structure.md](references/ribbon-structure.md)
When you need to:
- Understand the nesting:
RibbonControl→RibbonPageCategory→RibbonPage→RibbonPageGroup→BarItem - Add the default page category (always visible) vs custom (contextual) categories
- Configure the Quick Access Toolbar (
ToolbarItems) and Page Header Region (PageHeaderItems) - Add an
ApplicationMenu(Office 2007 style) orBackstageViewControl(Office 2010+ style) - Add a
RibbonStatusBarControlat the bottom of the window - Show contextual pages on demand (visible only when relevant)
Quick Start Example
A ThemedWindow with RibbonControl, Quick Access Toolbar, Application Menu, two pages, and bar items wired to MVVM commands:
Key Properties & API Surface
RibbonControl
| Property | Purpose | |---|---| | RibbonStyle | Office2007, Office2010, Office2019, OfficeSlim, TabletOffice | | ApplicationMenu | The application menu (Office 2007 style) or BackstageViewControl (Office 2010+) | | ToolbarItems | Quick Access Toolbar items collection | | PageHeaderItems | Items shown at the right edge of the title bar | | Categories / CategoriesSource | Page categories (declarative or ViewModel-bound) | | RibbonHeaderVisibility / RibbonTitleBarVisibility | Show/hide the header / title bar areas | | AllowSimplifiedRibbon / IsSimplified | Office-2019-style single-line Ribbon mode | | MDIMergeStyle | Block this Ribbon from being merged (Never) |
BarItem (base class)
| Property | Purpose | |---|---| | Content | Caption text (or any UI element) | | Glyph / LargeGlyph / MediumGlyph | 16x16 / 32x32 / 20x20 icons | | RibbonStyle | Per-item Ribbon display: SmallWithText, SmallWithoutText, Large, Default | | BarItemDisplayMode | Default, Content (caption only), ContentAndGlyph | | Command / CommandParameter | MVVM command | | ItemClick | Click event (alternative to Command) | | KeyGesture | Keyboard shortcut (e.g., Ctrl+V) | | IsVisible, IsEnabled | Standard visibility / enabled state |
RibbonPageGroup, RibbonPage, RibbonPageCategory
| Property | Purpose | |---|---| | Caption | Header text | | Glyph | Icon (RibbonPageGroup only) | | IsVisible | Toggle visibility (e.g., contextual pages/categories) | | MergeType / MergeOrder | MDI merging behavior — see [merging.md](references/merging.md) | | Color | Background tint (RibbonPageCategoryBase.Color) |
Common Patterns
Pattern 1: Items Declared Directly Inside a Bar/Group
The link is created implicitly. Use this for most cases.
Pattern 2: Shared Items via Item Links (BarManager Style)
Use explicit links when an item must appear in multiple places.
Pattern 3: MVVM — Items from ViewModel Collection
ContentControl is mandatory as the template root.
Pattern 4: Modern Standalone Bar Controls (Preferred over BarManager)
Troubleshooting
| Symptom | Cause | Solution | |---|---|---| | Ribbon doesn't integrate with title bar; window has two title bars | Window is a regular System.Windows.Window | Convert to dx:ThemedWindow and set WindowKind="Ribbon". | | dxr: / dxb: prefix unresolved | Missing namespace declaration or missing NuGet package | Add xmlns:dxr=".../winfx/2008/xaml/ribbon", xmlns:dxb=".../winfx/2008/xaml/bars". Install DevExpress.Wpf.Ribbon. | | error CS0104: 'Application' is an ambiguous reference | enable + DevExpress.Wpf.Core transitively references System.Windows.Forms | Qualify System.Windows.Application in App.xaml.cs. | | Items appear but glyphs don't | Glyph path resolution failed | Use {dx:DXImage Image=...png} (raster) or {dx:DXImage SvgImages/...svg} (vector), or set Glyph to a Uri to a packed resource. | | Ribbon items move from large to small icons inconsistently | Items haven't been given both Glyph (small) and LargeGlyph (large) | Supply both; the Ribbon auto-swaps based on width and RibbonStyle. | | BarItemLink shows nothing | BarItemName doesn't match any BarItem x:Name in scope; or item is outside the BarManager that owns the link | Verify x:Names and that both item and link are within the same BarManager or accessible scope. | | MDI merge doesn't happen | Child panel isn't inside a DockLayoutManager with DocumentGroup / DocumentPanel; or MDIMergeStyle is Never | Wrap docs in DocumentGroup. Use default MDIMergeStyle.WhenChildActivated or Always. | | Trying to style a bar item's pressed state via Style.Triggers doesn't apply | Standard WPF triggers on BarItem don't customize the rendered BarItemLink | Use BarItem.Triggers (the DevExpress collection) — it evaluates per link. See appearance-customization.md. | | Mixing RibbonControl and BarManager in one window causes layout glitches | Two paradigms in one container | Pick one: Ribbon UI, or BarManager + bars. Don't combine. |
Constraints & Rules
CRITICAL — follow these rules in every interaction:
- Window must be
ThemedWindowfor Ribbon UI. SetWindowKind="Ribbon"for full title-bar integration. - Build verification: After changes, run
dotnet buildand report errors before claiming success. - Target framework: Windows-only (
net{X}-windows,UseWPF=true). - NuGet: Use
DevExpress.Wpf.Ribbon(brings Bars transitively). All DevExpress packages share one version. - XAML namespaces:
dxr:Ribbon,dxb:Bars,dx:Core. Don't mix them up. - Items vs Links: Use direct items for the common case; use
*Linktypes only when sharing items across multiple bars (typically withBarManager). - Prefer modern bar controls: Use
MainMenuControl/ToolBarControl/StatusBarControlfor new code. Reach forBarManageronly when you need centralized cross-bar item sharing. - Don't mix Ribbon and BarManager in the same window.
- For Office 2010+ Ribbon style, use
BackstageViewControlfor the application menu. For Office 2007, useApplicationMenu. - Application ambiguity: When generating
App.xaml.cson .NET 6+, qualifySystem.Windows.Application.
Using DevExpress Documentation MCP
- Search:
devexpress_docs_search(technology="WPF Ribbon", query="") - Search:
devexpress_docs_search(technology="WPF Bars", query="") - Fetch:
devexpress_docs_get_content(url="")
Use MCP when you need exact API signatures for less-common items (BarLinkContainerItem, BarItemSelector, ToolbarListItem, LinkListItem) or version-specific bindings.
Next Steps
Start with [Getting Started](references/getting-started.md) for project setup and the ThemedWindow conversion. Then [Ribbon Structure](references/ribbon-structure.md) for the page/group anatomy, or [Bars and Layout](references/bars-and-layout.md) if you're building a classic toolbar+menu+statusbar UI.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: DevExpress
- Source: DevExpress/agent-skills
- License: MIT
- Homepage: https://www.devexpress.com
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.