按钮不覆盖父级的 IsEnabled
我有一个自定义控件,当该控件被禁用时,它会显示 tryAgain 按钮。
即使我在 xaml 中或使用触发器显式启用 Button
,这种嵌套也会导致按钮被禁用。有没有办法覆盖父控件的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: