-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RaiseCanExecuteChanged on MvxCommand status is not checked again #2064
Comments
Have a look at issue #1877, I think you have a similar misunderstanding. First of all the Probably you want to call the |
But this makes no sense. Why should a void method without any parameter and with a "Raise" as prefix not invoke that there might be a change?! Also there is the CanExecuteChanged event too for event registration. The |
About my code: I have this for the command property definition: This in the constructor for the init: And here are the two methods implemented:
And I now want to invoke that the CanExecute might change if the Feed is changing:
|
My initial explanation indeed makes no sense and is incorrect. The concept should indeed be that you call the Your code looks correct and I will have to look into why the |
@Sebastian1989101 while reading up on this issue I found the following explanation in the MvvmCross documentation (https://www.mvvmcross.com/documentation/fundamentals/data-binding):
In other words |
Thanks for the reply. I will change this in my code but maybe it should marked as Obsolete or at least threw a NotSupportedException while it is not working / implemented. So nobody get confused at this again. Is there any full overview about what is currently not working or not finished for Xamarin.Forms? I find it hard to find a full documentation about MvvmCross with Xamarin.Forms - I'm searching since 2 hours now how Modal dialogs work with Forms for example.. I used MvvmCross a few times with native implementations for iOS only projects and had never so many problems as with this simple project now.. |
@martijn00 This was added to the milestone for 5.1.0. Today I needed such a function again and tested it with 6.0.0 beta7 and again, |
Any chance you can reproduce this in playground and submit a PR showing the issue? |
@nickrandolph I'm currently trying to get the Playground compile and execute (also for the other open issue). As soon as this works I can create Repos with the issue(s). |
Are you trying to run it on Mac or PC? The latter is easier as it works in VS. Make sure you do a clean all across solution and then force rebuild individually on mvvmcross, Android appcompat, and the mvvmcross.forms. Then you should be good to run the samples |
@nickrandolph Just deleted everything and checked it out completely fresh. Now I'm trying to restore NuGet packages but it looks like it is failing all over the place. I'm even not able to compile the MvvmCross core project. It always ends with Actual I'm trying with VS for Mac because I prefer to work with my Mac. |
I think the multi-targeting isn’t working well on vs for Mac. If you have VS (PC) handy I would try that as I think you’ll be able to get it running much easier |
Here is a repo with the issue: |
I've this problem too. CanExecutedChanged and CanExecute (MvxCommand) is not always called after invoke RaiseCanExecuteChanged (checked on MVVMCross 6.0.0.beta7 and 6.0.1) |
On WPF I had a helper class that solved the issue
Where |
Same situation for me, |
If you're using |
I have a simple string.IsNullOrEmpty check for my Property to evaluate if the command can execute or not. But even if I call the RaiseCanExecuteChanged method, the CanExecute method is not called again and the button stays disabled. I'm using Xamarin.Forms with MvvmCross 5.1.
The text was updated successfully, but these errors were encountered: