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.v24.2.dll
NuGet Package: DevExpress.Wpf.RichEdit
Declaration
Property Value
Type | Description |
---|---|
BarManager | A BarManager object. |
Remarks
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;
barManager.Bars.Add(bar);
var item = new BarButtonItem();
item.Command = RichEditUICommand.EditCut;
item.CommandParameter = richEditControl1;
bar.ItemLinks.Add(item);
barManager.Items.Add(item);
//Bind the BarManager to the RichEditControl
richEditControl1.BarManager = barManager;
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the BarManager property.
Note
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.