# Toolbar Elements Styling

## Content



Toolbar for WPF allows you to style Toolbar elements to customize their appearance. You can use the following properties to change the foreground and background color of the elements:

*   **MouseOverForegroundBrush** - It defines the foreground color to be applied to the toolbar element on mouse hover.
*   **PressedForegroundBrush** - It defines the foreground color to be applied to the toolbar element on mouse left click.
*   **MouseOverBrush** - It defines the background color to be applied to the toolbar element on mouse hover.
*   **PressedBrush** - It defines the background color to be applied to the toolbar element on mouse left click.

The following GIF displays the styling applied on the toolbar elements to change their appearance.

![](https://cdn.mescius.io/document-site-files/images/17ce8aee-69c7-489e-8aef-ce88c8948853/images/toolbarappearance.gif)

The following code shows the implementation of the properties that can be used to change the appearance of the toolbar elements:

```xml
<Style TargetType="c1:C1ToolbarItem">
            <Setter Property="Foreground" Value="#333333"/>
            <Setter Property="MouseOverForegroundBrush" Value="DarkGreen"/>
            <Setter Property="PressedForegroundBrush" Value="Yellow"/>
            <Setter Property="MouseOverBrush" Value="LightGreen"/>
            <Setter Property="PressedBrush" Value="Green"/>
</Style>
```