# ButtonBar Class

> 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.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Namespace:** `TXTextControl.WPF`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.WPF.dll` from the setup
- **Inherits:** `System.Windows.Controls.ToolBar`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF > ButtonBar Class
- **782 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/buttonbar/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/buttonbar/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/buttonbar/llms-full.txt

---

### 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](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/llms-full.txt). 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](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/buttonbar/buttonbaritem-enumeration/llms-full.txt) enumeration. The `FrameworkElement.FindName` method can be used to get a certain item and manipulate, move or delete it.

### Syntax

```csharp
public class ButtonBar : ToolBar
```

```vbnet
Public Class ButtonBar
    Inherits ToolBar
```

### Examples

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

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

```vbnet
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.

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

```vbnet
Dim buttonBar As New TXTextControl.WPF.ButtonBar()
buttonBar.Band = 10
```

---

## In This Section

- [ButtonBar.ButtonBarItem Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/buttonbar/buttonbaritem-enumeration/llms-full.txt): 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.

---

## Nearby

- **Previous:** [BooleanConverter.ConvertBack Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/booleanconverter/convertback-method/llms-full.txt)
- **Next:** [ButtonBar.ButtonBarItem Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/buttonbar/buttonbaritem-enumeration/llms-full.txt)
