Button not overriding parent's IsEnabled
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
?
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>
精彩评论