views:

87

answers:

1

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"?

+1  A: 

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>
Scott J
That's what I was thinking. I am now using a different property to express the concept of my custom control like "IsAvailable" to effect the template and expose the button.
Ball