Click here to Skip to main content
15,885,122 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi guys and girls. I've got a resource dictionary that defines buttons and they're style for a custom keyboard control. Then i have a class that defines the position and some other variables for the custom keyboard. My question is how can i reference these variables from my resource dictionary to use IsEnabled on the buttons depending on the true or false of one of the variables?
Thanks!
Posted
Comments
Vijay Bth 7-Dec-11 9:06am    
Not clear what u want.

1 solution

From within the button template:

IsEnabled="{Binding BoolProperty, RelativeSource={RelativeSource AncestorType=KeyboardControl}}"

Something like that :)
 
Share this answer
 

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