Button not overriding parent's IsEnabled
-
21-09-2019 - |
Question
I have a custom control that displays a tryAgain button when the control is disabled.
This nesting is causing the button to become disabled, even if I explicitly enable the Button
in xaml or with a trigger. Is there a way to override a parent control's IsEnabled
?
Solution
The button can't be a child of the whatever parent is disabled. Try something like this:
<Grid>
<CustomControl IsEnabled="False">
</CustomControl>
<Button Content="TryAgain"/>
</Grid>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow