ButtonBar Class
- Namespace
TXTextControl.WPF
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WPF. SDK
- Assembly
TXTextControl.WPF. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WPF. SDK TXTextControl.from the setup.WPF. dll
- Inherits
- Tool
Bar - Button
Bar
- Tool
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 : ToolBarPublic Class ButtonBar
Inherits ToolBarExamples
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);Dim toggleButton As ToggleButton = TryCast(buttonBar1.FindName(ButtonBar.ButtonBarItem.TXITEM_Bold.ToString()), 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;Dim buttonBar As New TXTextControl.WPF.ButtonBar()
buttonBar.Band = 10Members
Constructors
| Constructor | Description |
|---|---|
| ButtonBar | Not described in the reference. public ButtonBar(); |
Enumerations
| Enumeration | Description |
|---|---|
| ButtonBarItem | Each 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. |