Question

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?

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top