我正在尝试覆盖按钮的背景颜色而不是 phoneAccentColor 我在 app.xaml 中编写样式代码,例如
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="FontSize" Value="25"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="Light"/>
<Setter Property="Height" Value="75"/>
<Setter Property="Width" Value="440"/>
<Setter Property="Background" Value="{StaticResource blueBackground}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="Transparent">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="Pressed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource blueBackground}"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
<DiscreteObjectKeyFrame KeyTime="0" Value="White"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
现在即使我没有点击我也看不到按钮我该如何更改它