Using WPF, what is the best method to update the background for a custom button control?

In your ControlTemplate give the Border a Name and you can then reference that part of its visual tree in the triggers. Here's a very brief example of restyling a normal Button : Style TargetType="{x:Type Button}.

In your ControlTemplate, give the Border a Name and you can then reference that part of its visual tree in the triggers. Here's a very brief example of restyling a normal Button: If that doesn't help, we'll need to know more, probably seeing your own XAML. Your description doesn't make it very clear to me what your actual visual tree is.

It doesn't work for me. After a SetterBaseCollection is in use (sealed), it cannot be modified. .

NET 3.5, VS 2008. I'm putting the Style in the Window.Resources. – Morawski Oct 12 at 9:06 1 @Morawski: Check out this Q&A.

– Joel B Fant Oct 12 at 13:27 thanks for the link, I'll have a look. – Morawski Oct 12 at 14:00.

You would want to add a trigger like this... Make a style like this: Then add some resources for the gradients, like this: Please let me know if you need more help with this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions