Share via

Enable a button from another button using Switch Case

Javier R 211 Reputation points
2022-08-25T18:36:19.997+00:00

As I can Enable button from another button using Switch case. the idea when the button is pressed2 disable the button 1

 public   void ColorButton()  
        {  
            Button btn =  new  Button();  
  
            switch(btn.Name)  
            {  
                case "BTMediaPurple":  
  
  
                    BTMediaPurple.IsEnabled = true;  
                    BTEllipsePurple.IsEnabled = false;  
  
  
                    break;  
           }  
    }  
Developer technologies | Universal Windows Platform (UWP)

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.