I am new to xamarin, i hope someone can help me with this:
I have a sinple page with entry fields and data binding.
I have page A with a listview. When I click on an item, I get redirected to page B which has the form elements.
async void LvData_ItemSelected(object sender, SelectedItemChangedEventArgs e)
{
if (e.SelectedItem != null)
{
var secondPage = new ProfileDataPage();
secondPage.BindingContext = e.SelectedItem;
await Navigation.PushAsync(secondPage);
}
}
This works, and in page B the fields are filled with the right data.
So now I change the value of an entry field. Then I click on the Save Button and I do something like this (profileData = BindingContext object):
profileData.Height = Functions.ToNullableDouble(Height.Text);
profileData.Weight = Functions.ToNullableDouble(Weight.Text);
etc...
Doesn't the BindingContext know somehow that the value of the entry has changed, and I can just send the BindingContext object to my web api for save, update and so on?
Thank you very much.
for example,here is a mode:
you could refer to Binding Mode