Apr 20, 2015 at 3:08 PM
Edited Apr 20, 2015 at 3:09 PM
I already posted this on the Xamarin forums and on StackOverflow but answers have been non-existing so far. I'm hopping by posting here someone can finally help me.
I've used a few other MVVMLight bindings on my project and they have worked without problems but now I can't seem to get past this one.
After inflating the Fragment
on its OnCreateView
I save a bunch of controls that I want to bind to: some are LinearLayouts (who I want to hide based on the VM's property) and some are TextViews which I want to bind strings to.
On my search for a solution for this problem I stumbled upon someone that said that the View might not be inflated as the
ends so my reference to that control could be wrong/null/not right. Therefore I moved my setBinding expressions to the
method to at least "give it a little more time". Also, as per someone suggested, my views are all public properties in the
pluginCodeLayoutBinding = this.SetBinding(
() => ViewModel.CreateMode,
() => pluginCodeLayout.Visibility,
pluginCodeBinding = this.SetBinding(
() => ViewModel.Script,
() => pluginCode.Text,
These bindings give out the following exceptions:
System.InvalidOperationException: Property not found: Visibility
System.InvalidOperationException: Property not found: Text
But when the execution breaks on the exception I'm able to inspect pluginCodeLayout and see that it has the Visibility property with it's default value.
Any help would be appreciated.
Thanks in advance!