A ToolBarTray can contain one or more ToolBar controls. Each ToolBar control can contain one or more controls inside it. A ToolBar control can also remain empty. When you start adding other controls to it, the toolbar starts changing its size and position, based on the available space.
The controls placed inside a ToolBar can have its associated events registered. If you want, you can also use command bindings to have a more granular association between the view and the code.
In the preceding example, the first button, denoted by the character B, stands for applying Bold weightage to the associated TextBox. When you click it for the first time, the FontWeight property of the text will set it to Bold. When you click it again, it will set to Normal. By following the same logic, you can add a Click event for other buttons and a SelectionChange event for the combobox, as shown in the preceding example.