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
Loading
