Skip to main content
A newer version of this page is available. .

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.v20.2.dll


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;
See Also