Design question
-
I've a ButtonEx class which retemplates a Button and takes its content and background color from a ChoiceItem class, which is given to it by a dependency property. Then I have a RadioButtonEx class which retemplates a RadioButton with a ButtonEx. When the RadioButton is checked, it should turn orange. But the background is managed by the ButtonEx class and taken from the ChoiceItem. I tried setting the background color in the ChoiceItem, but this is neither elegant nor does it work.. Can anyone tell me how to solve this in an elegant way?
-
I've a ButtonEx class which retemplates a Button and takes its content and background color from a ChoiceItem class, which is given to it by a dependency property. Then I have a RadioButtonEx class which retemplates a RadioButton with a ButtonEx. When the RadioButton is checked, it should turn orange. But the background is managed by the ButtonEx class and taken from the ChoiceItem. I tried setting the background color in the ChoiceItem, but this is neither elegant nor does it work.. Can anyone tell me how to solve this in an elegant way?