May 2019
Intermediate to advanced
504 pages
11h 50m
English
The simplest data binding in Xamarin.Forms is comprised of the path of the property we want to link to the current view property. In this type of declaration, we assume that the BindingContext of the whole and/or the parent view is set to use the target source view model.
If we take a look at the navigation implementation from our ListItemView to ItemView, you will notice that the selected item from the list is set as the binding context for the ItemView:
private void Handle_ItemTapped(object sender, Xamarin.Forms.ItemTappedEventArgs e) { var itemView = new ItemView(); itemView.BindingContext = (ItemViewModel) e.Item; Navigation.PushAsync(itemView); }
Once BindingContext is set, we can move on to using the property ...
Read now
Unlock full access