有时候需要在后台设置控件的背景
方法1:
Btn_SendNeedle_Admin.Content = "送针结束";
Btn_SendNeedle_Admin.Background = new SolidColorBrush((Media.Color)Media.ColorConverter.ConvertFromString("#AAFFFFFF"));
方法2:
Btn_SendNeedle_Admin.Background = new SolidColorBrush(Colors.Transparent);
方法3:
Btn_SendNeedle_Admin.Background = (Media.Brush)new BrushConverter().ConvertFrom("#FF3D3D3D");
方法4:
Btn_SendNeedle_Admin.Background = new SolidColorBrush(Media.Color.FromArgb(120, 255, 0, 0));
SolidBrush trnsRedBrush = new SolidBrush(Color.FromArgb(120, 255, 0, 0));