TX Text Control .NET for WPF

ButtonBar Class

Class
Namespace
TXTextControl.WPF
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.WPF.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.WPF.dll from the setup.
Inherits
  1. ToolBar
  2. ButtonBar

Description

The WPF.ButtonBar class represents a tool bar which can be used to show or to set font and paragraph attributes of a WPF.TextControl. It is inherited from the System.Windows.Controls.ToolBar class, containing default buttons and comboboxes as items, accessible through the Items property. These items can be sorted, deleted or moved through programming code, additional items can be added through programming code or the design time collection editor. Each item has a name, available through its Name property, which corresponds with a member of the WPF.ButtonBar.ButtonBarItem enumeration. The FrameworkElement.FindName method can be used to get a certain item and manipulate, move or delete it.

Syntax

public class ButtonBar : ToolBar

Examples

The ButtonBar can be configured. The following example removes the Bold button from a ButtonBar:

ToggleButton toggleButton = buttonBar1.FindName(ButtonBar.ButtonBarItem.TXITEM_Bold.ToString()) as ToggleButton;
buttonBar1.Items.Remove(toggleButton);

The following example creates a Button Bar instance and configures its band setting for a document workflow.

TXTextControl.WPF.ButtonBar buttonBar = new();
buttonBar.Band = 10;

Members

Constructors

ConstructorDescription
ButtonBarNot described in the reference. public ButtonBar();

Enumerations

EnumerationDescription
ButtonBarItemEach ButtonBarItem represents an item in a WPF.ButtonBar. The corresponding string of a ButtonBarItem is the same as the item's Name property. The string can be used with the FrameworkElement.FindName method to get the item and manipulate, move or delete it.