Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there something wrong with this syntax? #67

Open
fuyunekojima opened this issue Oct 25, 2020 · 1 comment
Open

Is there something wrong with this syntax? #67

fuyunekojima opened this issue Oct 25, 2020 · 1 comment

Comments

@fuyunekojima
Copy link

<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
Copy link

Try this :

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants