Say I have a control that has been disabled. It contains a bunch of elements, but I want one of these child elements to remain on.
Something like that:
<ContentControl IsEnabled="False">
<Border>
<Button Content="Button" IsEnabled="True"/>
</Border>
</ContentControl>
Thus, in this example, the Button IsEnabled = "True" parameter is overridden by its parent. Is there any way to stop this?
This seems like a strange thing, but I have a situation where, when the control is disabled, and the mouse user descends on it, I still want the event to be fired.
I read in WPF Unleashed that I was wrapping something in the Frame control, "..deletes the contents of the remaining interface properties [and], which are usually inherited down the element tree when they reach the frame," but the button wrapper in the example above in frame does not work.
Am I on the wrong track here?
source
share