Skip to main content

RichEditControl.BarManager Property

Gets or sets the main component that provides the Bars functionality. This is a dependency property.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v23.2.dll

NuGet Package: DevExpress.Wpf.RichEdit


public BarManager BarManager { get; set; }

Property Value

Type Description

A BarManager object.


The BarManager specifies the container for bars and popup menus. Use this property to enable bar or Ribbon interface of DXRichEdit control.

The BarManager should be initialized when binding it to the RichEditControl. To create bars dynamically, unlink the RichEditControl from BarManager, add the required bars and a bar item and then link RichEditControl to this BarManager, as shown in the code snippet below:

//Unlink the BarManager from the RichEditControl
var barManager = richEditControl1.BarManager;
richEditControl1.BarManager = null;

 //Create new bar items
var bar = new Bar() { Caption = "New Item" };
bar.DockInfo.ContainerType = BarContainerType.Top;
bar.ShowDragWidget = false;
var item = new BarButtonItem();
item.Command = RichEditUICommand.EditCut;
item.CommandParameter = richEditControl1;

//Bind the BarManager to the RichEditControl
richEditControl1.BarManager = barManager;

The following code snippets (auto-collected from DevExpress Examples) contain references to the BarManager property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also