Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个自定义控件,当控件被禁用时会显示一个 tryAgain 按钮。
即使我Button在 xaml 中显式启用或使用触发器,这种嵌套也会导致按钮被禁用。有没有办法覆盖父控件的IsEnabled?
Button
IsEnabled
该按钮不能是禁用任何父级的子级。尝试这样的事情:
<Grid> <CustomControl IsEnabled="False"> </CustomControl> <Button Content="TryAgain"/> </Grid>