Шаблоны в WPF | Не работает кнопка
Сделал шаблон для кнопки, но почему-то после этого кнопка перестала быть кликабельной. Почему так? Вот сам XAML:
<Window.Resources>
<ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
<Border BorderBrush="Black" BorderThickness="3" CornerRadius="2">
<Border.Background>
<LinearGradientBrush>
<GradientStopCollection>
<GradientStop Offset="0" Color="LimeGreen"></GradientStop>
<GradientStop Offset="1" Color="LightBlue"></GradientStop>
</GradientStopCollection>
</LinearGradientBrush>
</Border.Background>
<ContentPresenter RecognizesAccessKey="True"></ContentPresenter>
</Border>
</ControlTemplate>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Width="300" Height="160" Template="{StaticResource ButtonTemplate}">ggg</Button>
</Grid>