--- title: "How to: Style Controls on a ToolBar" ms.date: "03/30/2017" helpviewer_keywords: - "styling controls on toolbar [WPF]" - "toolbars [WPF]" - "customizing controls on toolbar [WPF]" ms.assetid: ba6ae056-d6a9-4c24-90f8-467ab0bc0b1a --- # How to: Style Controls on a ToolBar The defines objects to specify the style of controls within the . To style a control in a , set the `x:key` attribute of the style to a defined in . The defines the following objects: - - - - - - - - ## Example The following example defines styles for the controls within a . [!code-xaml[ToolBar_snip#ToolBarAllStyles](~/samples/snippets/csharp/VS_Snippets_Wpf/ToolBar_snip/CS/pane1.xaml#toolbarallstyles)] [!code-xaml[ToolBar_snip#ToolBar](~/samples/snippets/csharp/VS_Snippets_Wpf/ToolBar_snip/CS/pane1.xaml#toolbar)] ## See also - [Styling and Templating](/dotnet/desktop-wpf/fundamentals/styles-templates-overview)