开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜