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
ContentView's Model is ignored in Xamarin.Forms #349
Comments
This looks like a bug. I'm not sure about a work around at the moment. |
As a work around, if possible is to not have the Save() method in MainContainerViewModel. |
This looks to be a timing issue caused by lack of decent events in Xamarin.Forms. When we "bind" the view and view model together we set an attached dependency property on the view called When the element with the message attached is In this case Xamarin Forms doesn't have an equivalent of Switching some order of operations (bind the view / view model before adding to visual tree) lets us set the target before causing the event to fire. It's something I've wanted to do in the main framework for a while now, but could be a breaking change. Happy to try it out in Xamarin.Forms first. |
Just pushed a fix, if you want to have a look and see if it resolves in your app as well. |
I have the following XAML for a parent view:
This is its ViewModel:
This is the DetailsView:
This is the ViewModel for the Details:
I always end up in the MainContainerViewModel's
Save
method instead of the detail viewmodel.Why? What should I modify?
The text was updated successfully, but these errors were encountered: