lundi 2 octobre 2017

Wpf Button IsEnabled not working

i have a method that enabling and disabling button in here.My if-else block should do when enter a number to lbDivide the 'öde', '0' and '00' buttons should be active but only activing öde button.How do i solve this ?

my payment page

öde = make payment

Kişi Sayısı = How many person?

private void Bol_Click(object sender, RoutedEventArgs e)
    {
        lbDivide.Text = "0";
        btnBol.Opacity = 0.5;
        btnBol.IsEnabled = false;
        lbPayment.Visibility = Visibility.Hidden;

        if (lbDivide.Text == "0")
        {
            btnQr.Opacity = 0.5;
            btnQr.IsEnabled = false;
            zero.Opacity = 0.2;
            zero.IsEnabled = false;
            double_zero.IsEnabled = false;
            double_zero.Opacity = 0.2;
        }
        else
        {
            btnQr.Opacity = 1;
            btnQr.IsEnabled = true;
            zero.Opacity = 1;
            double_zero.Opacity = 1;
            zero.IsEnabled = true;
            double_zero.IsEnabled = true;
        }

Aucun commentaire:

Enregistrer un commentaire