XAML in windows phone 8.1 中的 IsChecked 时如何更改复选框的背景颜色
How to change background color of checkbox when checkbox is IsChecked in XAML in windows phone 8.1
有没有办法在 xaml 而不是 c# 中更改复选框背景颜色。我知道有 Checked
和 UnChecked
事件。但我必须在 Xaml 中使用。
我参考了它的模板,但找不到解决方案。请帮助我
谢谢
在 x:Name="Checked" 视觉状态的复选框外观的编辑模板样式中。
在故事板中添加以下动画以在选中时更改复选框的背景:
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
Storyboard.TargetName="Grid">
<DiscreteObjectKeyFrame KeyTime="0"
Value="#FFABCDEF" /> // argb value of your desired background color
</ObjectAnimationUsingKeyFrames>
有没有办法在 xaml 而不是 c# 中更改复选框背景颜色。我知道有 Checked
和 UnChecked
事件。但我必须在 Xaml 中使用。
我参考了它的模板,但找不到解决方案。请帮助我
谢谢
在 x:Name="Checked" 视觉状态的复选框外观的编辑模板样式中。
在故事板中添加以下动画以在选中时更改复选框的背景:
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
Storyboard.TargetName="Grid">
<DiscreteObjectKeyFrame KeyTime="0"
Value="#FFABCDEF" /> // argb value of your desired background color
</ObjectAnimationUsingKeyFrames>