Alex141 / CalcBinding

Advanced WPF Binding which supports expressions in Path property and other features

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there something wrong with this syntax?

fuyunekojima opened this issue · comments

<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'}"/>

Try this :

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