开发者

Button not overriding parent's IsEnabled

开发者 https://www.devze.com 2022-12-23 14:52 出处:网络
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 x

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

精彩评论

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

关注公众号