mercredi 15 septembre 2021

C# CheckBox Method logic wont manipulate

I'm coding C# and trying to manipulate certain aspects if a user clicks the checkbox. Every time I try to build this simple method no errors but the logic doesn't work. How do I utilize IsChecked effectively and right?

 public void Function1() 
        {
            if (expBox.IsChecked == true)
            {
                TEST.Visibility = Visibility.Visible;
            }
            else if(noobBox.IsChecked == true)
            {
                noobBlock.Visibility = Visibility.Collapsed;
            }
            else if(expertBox.IsChecked == true)
            {
                expertBlock.Visibility = Visibility.Collapsed;
            }
        }



Aucun commentaire:

Enregistrer un commentaire