SimpleToDoList - CompiledBinding fails, ReflectionBinding works #90
Unanswered
descenteer
asked this question in
Q&A
Replies: 1 comment
-
Please show me what you have so far. Best if you can upload a minimal sample here (without obj and bin folder). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So, I'm rather new to data binding and I'm trying to figure out why a particular thing is failing while I'm working through the SimpleToDoList sample tutorial.
When I implement this section of step 4:
<Button Command="{Binding #Root.((vm:MainViewModel)DataContext).RemoveItemCommand}" CommandParameter="{Binding .}" Grid.Column="1">
It compiles and runs, but I get a System.ArgumentException at when I attempt to create a new item. Change it around to use ReflectionBinding like so:
<Button Grid.Column="1" Command="{Binding #Root.DataContext.RemoveItemCommand}" CommandParameter="{Binding .}">
And it works as expected. I've poked around for a couple of hours - and am continuing to do so - but has anybody got any directions I should chase to figure out why this is happening?
Beta Was this translation helpful? Give feedback.
All reactions