views:

15

answers:

0

Here is a simplification of the problem

I want a Button with an extra DependancyProperty that I can bind to. The value of this property will control which image is selcted on the button.

Question 2 is do I create a UserControl and draw the button on. If so how do I can use triggers to manage the image BUT I do not know how to do the Templet for a User control e.g.

(Button.Template}

(ControlTemplate TargetType="{x:Type Button}")

where Button should be the name UserControl name .. but what should I replace {x:Type Button} with for a user control??

The more code example the better please.

Question 3 if I create a Custom Control do I inherate from Button and just add DependancyProperty.

If I do that .. when I show it on the page it doesn't appear like a button. Just a blank box which wont display anything...