Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF Button No Border No Background

Tags:

button

styles

wpf

I just need a button so simple that it looks like a TextBlock. Some time ago I saw an answer on SO to style the button based on a static style for a button in a menu but I cannot find that answer (and I have been searching for an hour). Does anyone know what system style I am referring to and the syntax to apply that style to a button?

like image 731
paparazzo Avatar asked Oct 14 '11 15:10

paparazzo


1 Answers

Is it maybe the style used for a button in a ToolBar that you're referring to? The ToolBar control overrides the Button style so they appear flat. You can apply that style to a button like this...

<Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
like image 158
IanR Avatar answered Sep 28 '22 08:09

IanR