Is it possible to apply NOT(!) operator while DataBinding a property of a control ?

Posted by Ashish Ashu on Stack Overflow See other posts from Stack Overflow or by Ashish Ashu
Published on 2010-05-20T10:05:54Z Indexed on 2010/05/20 10:10 UTC
Read the original article Hit count: 133

Filed under:
|
|

I have Button control and I have to set the IsEanbled property based on the bool variable.

bool IsBoolVariable

I want if IsBoolVariable property is true then I want to set the IsEnabled property to false AND when IsBoolVariable property is false then I want to set the IsEnabled property to true.

Is it possible to apply not(!) operator while defining the binding as given below

<Button
IsEnabled = "{Binding Path = **!**IsBoolVariable}" />

I can very well do that by applying convertors , but that is the only way to do that?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about wpf-controls