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

InvokeCommandAction exception when CommandParameter is NULL #103

Closed
Depechie opened this issue Jun 20, 2016 · 5 comments
Closed

InvokeCommandAction exception when CommandParameter is NULL #103

Depechie opened this issue Jun 20, 2016 · 5 comments

Comments

@Depechie
Copy link

Depechie commented Jun 20, 2016

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...

@premiaware
Copy link

premiaware commented Jun 23, 2016

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
Error XBF generation error code 0x07da.

@pedrolamas
Copy link
Collaborator

@premiaware that is caused by #102, not related with my fix for this issue!

@Depechie
Copy link
Author

Would be nice if this would get into the main stable nuget release :/ any move on #102 to get this going?

@ScottIsAFool
Copy link
Contributor

Paging @jonwchu

LocalJoost added a commit that referenced this issue Aug 21, 2016
Fixed #103: Check for CommandParamenter value set instead of non-null value
@Depechie
Copy link
Author

Depechie commented Sep 1, 2016

All fun and games to close it, but when will the nuget be updated? :)

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

4 participants