Hello,
For this requirement, you need to override the default style of CheckBox in WinUI3.
Step 1. Add the following code into Platforms/Windows/App.xaml
. Since the default style of CheckBox is too long to post to Q&A, you can refer to the first step in Can we able to modify the design of toggle switch in maui.
Step 2. You' need to find the <VisualState>
tags for CheckedPressed
and CheckedPointerOver
, then, search the following code:
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0" Value="#00FF00" />
</ObjectAnimationUsingKeyFrames>
Step 3. Modify the Value
of the value in both tags to the RGP value to customize the color of the tick.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.