I want to create a button template that will make my button to have inisible clickable area around it. when I press the area the buttons click event should be
here is my try:
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Button Content="Button" HorizontalAlignment="Left" Margin="214,150,0,0" Name="button1" VerticalAlignment="Top" Click="button1_Click">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="Pink" Padding="25">
<Button Content="{TemplateBinding Content}"></Button>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</Window>
when i press inside the border the button1_Click
method is called.
but the inner button animation is not ativated.
I want the inner button to behave as if clicked when I press inside the border area.