-
Notifications
You must be signed in to change notification settings - Fork 114
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
InvokeCommandAction exception when CommandParameter is NULL #103
Comments
I have the same problem, I have apply the change "Fixed #103: Check for CommandParamenter value set instead of non-null" but when compile sample the problem is |
@premiaware that is caused by #102, not related with my fix for this issue! |
Would be nice if this would get into the main stable nuget release :/ any move on #102 to get this going? |
Paging @jonwchu |
Fixed #103: Check for CommandParamenter value set instead of non-null value
All fun and games to close it, but when will the nuget be updated? :) |
I have a GridView hooked up to an observable collection of type Person ( POCO ).
I want to reroute the tapped event to a command in my viewmodel through use of InvokeCommandAction.
By using this I also use a CommandParameter, this is bound to a SelectedPerson ( of type Person ) property on the viewmodel in TwoWay mode ( general binding no x:Bind ).
If the selectedPerson is NULL and the Observable collection is NULL you'll get an invalid cast exception of the TappedRoutedEventArgs to Person.
I would have thought I would get NULL as input in my method ( that is linked to the command ).
Changing every reference to Person in this chain to object fixes the problem, but that would not be that great I guess.
Also when there are items in the observable collection everything works.
Repo: https://github.com/Depechie/TapCommand
Due to issue #102 I was unable to test this with the samples project to debug myself...
The text was updated successfully, but these errors were encountered: