WPF Button No Border No Background WPF Button No Border No Background wpf wpf

WPF Button No Border No Background


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}}" />


If you want a button that looks like a TextBlock, you can make a button that is a TextBlock.

<Button Content="I'm a Button; click me">    <Button.Template>        <ControlTemplate TargetType="Button">            <TextBlock Text="{TemplateBinding Content}" />        </ControlTemplate>    </Button.Template></Button>