System.Windows.Controls.Button b = new System.Windows.Controls.Button();
b.Content = "OK";
b.Background = System.Windows.Media.Brushes.Red;
For more WPF interview question please check this link...
http://mindstick.com/Interview/401/How%20to%20change%20backcolor%20of%20button%20control%20dynamically
Interviews4 answers
How to change the Background color of a button dynamically in WPF?
4 Answers
Jaypee HudaPosted Nov 19, 2011, 4:18 AM EST
There is no Burshes class it is Brushes class............
sarika jainPosted Feb 28, 2011, 9:38 PM EST
To change the background color of a button dynamically in WPF
System.Windows.Controls.Button b1=new System.Windows.Controls.Button();
b1.Background=System.Windows.Media.Brushes.Blue;
sarika jainPosted Feb 28, 2011, 9:38 PM EST
System.Windows.Controls.Button objButtton=new System.Windows.Controls.Button();
objButton.Background=System.Windows.Media.Burshes.Red;
Syed ShakeerPosted Feb 26, 2011, 8:56 PM EST
