Syed Shakeer
How to change the Background color of a button dynamically in WPF?
By Syed Shakeer in Windows Forms on Feb 27 2011
  • Jaypee Huda
    Nov, 2011 19

    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


    • 0
  • sarika jain
    Mar, 2011 1

    There is no Burshes class it is Brushes class............

    • 0
  • sarika jain
    Mar, 2011 1

    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;

    • 0
  • Syed Shakeer
    Feb, 2011 27

    System.Windows.Controls.Button objButtton=new System.Windows.Controls.Button();

    objButton.Background=System.Windows.Media.Burshes.Red;

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS