C# Change A Button's Background Color

前端 未结 7 993
独厮守ぢ
独厮守ぢ 2020-12-01 14:04

How can the background color of a button once another button is pressed?

What I have at the moment is:

ButtonToday.Background = Color.Red;
         


        
7条回答
  •  广开言路
    2020-12-01 14:25

    // WPF
    
    // Defined Color
    button1.Background = Brushes.Green;
    
    // Color from RGB
    button2.Background = new SolidColorBrush(Color.FromArgb(255, 0, 255, 0));
    

提交回复
热议问题