A newer version of this page is available. Switch to the current version.

RibbonPageGroup.CaptionButtonCommand Property

Gets or sets the command to invoke when the group’s Caption Button is clicked. This is a dependency property.

Namespace: DevExpress.Xpf.Ribbon

Assembly: DevExpress.Xpf.Ribbon.v20.2.dll


public ICommand CaptionButtonCommand { get; set; }

Property Value

Type Description

The command to invoke when the group’s Caption Button is clicked.


The Caption button is a clickable element at the right bottom corner of a RibbonPageGroup. Its visibility can be toggled via the RibbonPageGroup.ShowCaptionButton property. You can implement the Caption Button functionality by either handling the RibbonPageGroup.CaptionButtonClick event or using the CaptionButtonCommand property. The RibbonPageGroup.CaptionButtonClick event is fired before the CaptionButtonCommand is executed.

For more information about use of the Caption Button command, see the example below.


The following figure illustrates a RibbonControl containing a ‘Font’ RibbonPageGroup that has a Caption Button (hovered by the mouse cursor in the figure). The example demonstrates how to attach a command to a Caption Button via the RibbonPageGroup.CaptionButtonCommand property.

Ribbon Group Caption Button Commanding Image

When the Caption Button is clicked, the ‘Font Preferences’ window is displayed.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DevExpress.Xpf.Ribbon;

namespace RibbonCustomization {
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window {
        public static RoutedCommand FontOptionsMenu = new RoutedCommand();
        public MainWindow() {
            DevExpress.Xpf.Core.ApplicationThemeHelper.ApplicationThemeName = "Seven";

        private void FontOptionsMenuExecuted(object sender, ExecutedRoutedEventArgs e) {
            new FontMenuWindow().Show();

        private void FontOptionsMenuExecute(object sender, CanExecuteRoutedEventArgs e) {
            e.CanExecute = true;
See Also