Closed Symbai closed 3 months ago
Try to make the LoginCommand()
method to public
, it worked for me.
private async Task LoginCommand()
This is incorrect. You shouldn't have the "Command" suffix in your method, because the generator will already append it. You should also be getting a warning about this from the analyzer I think. You should rename that method to just Login
and keep it private, and then bind to the generated LoginCommand
.
If that doesn't work because the Avalonia source generators can't see the generated command when they run, that's not a bug in the MVVM Toolkit, but an expected limitations of concurrent source generators, and it's by design. If so, you might not be able to use a generated command here if Avalonia works that way.
Describe the bug
I'm trying to figure out how to use a simple command which canexecute depends on a bool property. Unfortunately the sample application is heavily outdated as there are like 3 different ways of how to setup a command. And all of them are missing the canexecute step.
This is the exception I receive:
Anyway please see code below. Any help is appreciated
Regression
No response
Steps to reproduce
Expected behavior
When I press the button the button should get disabled and after 5 seconds get enabled. But pressing the button throws the exception above.
Screenshots
No response
IDE and version
VS 2022 Preview
IDE version
No response
Nuget packages
Nuget package version(s)
8.2.2
Additional context
No response
Help us help you
No, just wanted to report this