Reputation: 876
Is there any way to change check box background color in xaml not c# . I know there are Checked
and UnChecked
event .but I have to use in Xaml .
I have refer its template but can't find the solution . please help me for that
Thank you
Upvotes: 0
Views: 897
Reputation: 981
In the edit template style of the checkbox lookout for the x:Name="Checked" visualstate.
Add the following animation inside the storyboard to change the background of the checkbox when checked:
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
Storyboard.TargetName="Grid">
<DiscreteObjectKeyFrame KeyTime="0"
Value="#FFABCDEF" /> // argb value of your desired background color
</ObjectAnimationUsingKeyFrames>
Upvotes: 1