How to fill the background of a button in WPF at run time?
In .xaml file add a button and resource which is as follows :
Title="WindowsApplication7" Height="300" Width="300"
In .cs file add the below mentioned code and you will see
the button using the resource at run time not compile time .
this.Loaded += new RoutedEventHandler(changeColorBK);
void changeColorBK(object s, RoutedEventArgs e)
button1.Background = Resources["bru"] as Brush;
Dec 03, 2007 - seemajain8212