Alex141 / CalcBinding

Advanced WPF Binding which supports expressions in Path property and other features
Apache License 2.0
638 stars 79 forks source link

Is there something wrong with this syntax? #67

Open fuyunekojima opened 4 years ago

fuyunekojima commented 4 years ago

<Button IsEnabled="{c:Binding '(IsBusy.Value || IsLoggedIn.Value) ? 0 : 1'}"/>

You want to set "IsBusy.Value or IsLoggedIn.Value is false if it is true, and true if it is false" to IsEnabled of Button.

IsBusy and IsLoggedIn are ReactiveProperty and debugging has confirmed that the values are set properly.

They seem to work as long as they have a single value, as shown in the following syntax

<Button IsEnabled="{c:Binding '!IsBusy.Value"/> or <Button IsEnabled="{c:Binding '(IsBusy.Value) ? 0 : 1'}"/>

keytrap-x86 commented 3 years ago

Try this :


<Button IsEnabled="{c:Binding '(IsBusy.Value == 0 || IsLoggedIn.Value == 0) ? 0 : 1'}"/>