Click here to Skip to main content
15,904,416 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I have created a button in FrameworkElementFactory and trying to disable the button and to change the color of button to red. My code is like

C#
FrameworkElementFactory btnHeaderDelete = new FrameworkElementFactory(typeof(Button));

btnHeaderDelete.SetValue(Button.IsEnabledProperty, true);
//btnHeaderDelete.SetValue(Border.BackgroundProperty, Brushes.Red);
btnHeaderDelete.SetValue(Button.BackgroundProperty, Brushes.Red);



The above code is disabling the button, but the button color is not getting change to red.
Please tell me how to do this.

Thank you all in advance.

Regards,
Vidi
Posted
Comments
aliwpf 5-Mar-13 0:42am    
why do you work with FrameWorkElementFactory?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900