C# Change A Button's Background Color

前端 未结 7 990
独厮守ぢ
独厮守ぢ 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:19

    Code for set background color, for SolidColor:

    button.Background = new SolidColorBrush(Color.FromArgb(Avalue, rValue, gValue, bValue));
    

提交回复
热议问题