How to set a flat style to Button and ComboBox in WPF

In XAML: 1 2 3 4 5 6 7 8 9 <Button   Name="myComboBox"   Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />   <ComboBox   Name="myButton"   Style="{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}" /> <Button Name=”myComboBox” Style=”{StaticResource {x:Static ToolBar.ButtonStyleKey}}” /> <ComboBox Name=”myButton” Style=”{StaticResource {x:Static ToolBar.ComboBoxStyleKey}}” /> In code (C#): 1 2 3 4 5 myButton.Style =     (Style)FindResource(ToolBar.ButtonStyleKey);   myComboBox.Style […]
Continue reading…