I want to change the checkbox text color dynamically in UWP when the checkbox is checked. If I didn't give any color then it should take the default color based on theme. I tried the below code but it does not work.
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
checkBox.Foreground = new SolidColorBrush(Windows.UI.Colors.Red);
}
Can anyone help me on this?
Regards, Sarath
Aucun commentaire:
Enregistrer un commentaire