What I'm attempting to do is wrap a control in a border without changing it's default appearance, and also without having to create custom controls.
I'd like to do the equivalent of this:
<Border BorderBrush="Red" BorderThickness="3">
<Button>Hello!</Button>
</Border>
Just to any control, without actually having to wrap everything in a Border
. I attempted to do this by modifying the Template
in a style with the following:
<ControlTemplate TargetType="{x:Type Button}">
<Border BorderBrush="Red" BorderThickness="3">
<ContentPresenter />
</Border>
</ControlTemplate>
This successfully adds a border, but also wipes out any other style on the Button
. I'd like it to still look like a button, just with an extra border around it.
Any thoughts?