Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 same UserControl name .. but what should I replace {x:Type Button} with for a user control?

The more code examples the better please.

Question 3 if I create a Custom Control do I inherit 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...
Posted
Updated 2-Feb-10 9:47am
v3

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