I've got 2 buttons on my form, and they both look very, very flat.
I can't seem to find a way to make them look more like:
The XAML for my buttons is:
<Button x:Name="bttnDailyReport" HorizontalAlignment="Left" Margin="618,27,0,0" VerticalAlignment="Top" Width="121" Height="93" FontFamily="Microsoft Sans Serif" FontSize="20" FontWeight="Bold" Grid.Column="1" BorderBrush="Black">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"><Run Text=" Generate"/><LineBreak/><Run Text="Daily Report"/></TextBlock>
</Button>
<Button x:Name="bttnCancel" HorizontalAlignment="Left" Margin="618,126,0,0" VerticalAlignment="Top" Width="121" Height="93" FontFamily="Microsoft Sans Serif" FontSize="20" FontWeight="Bold" Click="BttnCancelClick">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"><Run Text="Exit"/></TextBlock>
</Button>
Now, my question is, is it possible to make the buttons appear like the button in WinForms, or am I stuck with flat buttons?
Seems, somewhere in your resources, flat button style is used as default style for button.
Check Styling and Templating. Either you need to override the style in your button, or give key to the default style, and apply wherever needed.
How to override a global style (that doesn't have an x:Key), or alternatively apply a named style to all type-targeted controls?
Just reference PresentationFramework.Aero.dll
in your project and add this code to to the window's XAML:
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFramework.Aero;component/themes/aero.normalcolor.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With