public static async Task <Address> ModalPickAddress(INavigation where, Address hint) { var picker = new AddressPicker(hint); await where.PushModalAsync(picker, true); var result = await picker.pickResult.Task; await where.PopModalAsync(); return(result); }
private async void MapButton_Clicked(object sender, EventArgs e) { Address hint = new Address() { streetAndNumber = addrStreet.Text, city = addrCity.Text, zipcode = addrZip.Text }; Address result = await AddressPicker.ModalPickAddress(Navigation, hint); if (result != null) { addrStreet.Text = result.streetAndNumber; addrCity.Text = result.city; addrZip.Text = result.zipcode; } }