# ToolBar

The default toolbar control (accessory in the form) is enhanced to support Windows Visual Styles and to look like the ToolStrip controls in WinForms without having to rewrite the code that relies on the ported controls.

It is enough to set the two new properties of the ToolBar control to automatically upgrade the look & feel of the toolbar and all the buttons that are contained.

The typical look of the toolbar using the default Visual Style mode is shown below:

<div align="left"><img src="https://iceteagroup.com/docs/media/embim1.png" alt="Normal toolbar"></div>

Setting the *UseVisualStyleBackColor* property of the ToolBar control to true, enables the enhanced background painting and the toolbar looks like the image below (depending on the color scheme):

<div align="left"><img src="https://iceteagroup.com/docs/media/embim2.png" alt="Toolbar with enhanced background"></div>

To change the appearance of all the buttons on the toolbar to look like a ToolStrip control, set the Appearance property to Flat. When the Appearance = Flat and UseVisualStyleBackColor = True, the toolbar control looks like this:

<div align="left"><img src="https://iceteagroup.com/docs/media/embim3.png" alt="Toolbar with enhanced buttons and background"></div>

## XSalToolBars

The same effect is supported in *XSalToolBars* by setting the static properties in *XSalToolbar* as:

```csharp
XSalToolbar.UseVisualStyleBackColor = true;
XSalToolbar.Appearance = ToolBarAppearance.Flat;
```

<div align="left"><img src="https://iceteagroup.com/docs/media/embim4.png" alt="XSalToolbar with enhanced buttons and background"></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iceteagroup.com/general/framework/controls/toolbar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
