-
Notifications
You must be signed in to change notification settings - Fork 296
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
MAUI Button IsEnabled Binding #372
Comments
Hello pouchbunny, thank you for opening an issue with us! I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌 |
As a follow up. In my own app I created a button to change the value of the binding of one of my buttons that's not being disabled from the start as it should. With the new button it acts just like what I described above. I can officially enable and disable my save button by changing the binding value with the new RelayCommand attached to the new button. |
You haven't demonstrated that this is in fact a bug in the MVVM Toolkit whatsoever yet. As far as I can see, it's not. It might be a bug in MAUI, yes, and for that this is the wrong repo. Have you opened an issue on the MAUI repo too? |
@Sergio0694 I think u have your point, but really it is disappoint us when we face simple issues that should not exist or miss essential features. |
to be more silicification, my problem is the button can't disable itself from the C# code. |
It seems as as long the command method with the [RelayCommand] is synchronous, all works fine. When using an Async command, the button stays gray after the first click (although it's clickable as expected). Only on Windows, not in Android. |
Closing this, as it just seems like an issue with MAUI (also I think I've seen this being mentioned in a separate issue as well though I don't have it handy right now). I'd recommend opening an issue in the MAUI repo (or finding one if it already exists) and possibly linking this one there for reference 🙂 |
move to maui |
Describe the bug
I started noticing my buttons acting weirdly when trying to disable via bindings where in my current project even after setting IsEnabled binding value to false I can still click the button and fire off the binding command.
I created a new app to test and found out that despite when the app first starts and the binding is false, the button can still be clicked until I set it true, then back to false. Only then will it start acting as it should.
IMAGES:
Regression
No response
Reproducible in sample app?
Steps to reproduce
Expected behavior
The original button should be disable from the start as the binding CanClick is initially set to false
Screenshots
Windows Build Number
Other Windows Build number
Version 10.0.19044 Build 19044
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
17.3.0 Preview 3.0
Device form factor
Desktop
Nuget packages
Additional context
No response
Help us help you
No.
The text was updated successfully, but these errors were encountered: