mercredi 28 avril 2021

How do I use checkbox event?

I have created the following GUI:

GUI with an TextBox (#1) to enter a machine name and a CheckBox (#2) to enable conversion of the machine name to uppercase.

I enter my text in a TextBox (#1 in the picture). I have a Button (#2 in the picture) which should change the input in the TextBox to uppercase so I wrote the following code:

private void tuUpperCase(object sender, RoutedEventArgs e)
{
    if (crossBox.IsChecked == true)
    {
        machineName.Text.ToUpper();
    }
}



Aucun commentaire:

Enregistrer un commentaire