/// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. The Parameter /// property is typically used to configure the page.</param> protected override void OnNavigatedTo(NavigationEventArgs e) { if (rootPage.ContactEvent != null) { ContactMapActivatedEventArgs mapArgs = rootPage.ContactEvent as ContactMapActivatedEventArgs; if (mapArgs != null) { Windows.ApplicationModel.Contacts.ContactAddress address = mapArgs.Address; rootPage.NotifyUser( String.Format("Map address activation was received. The street address to map is {0}.", String.IsNullOrEmpty(address.StreetAddress) ? "unspecified" : address.StreetAddress), NotifyType.StatusMessage); } } }
public static ContactAddress Create(WinRtAddress a) { if (a == null) { return(null); } return(new ContactAddress() { //PhysicalAddress = new CivicAddress() //{ // AddressLine1 = a.StreetAddress, // City = a.Locality, // CountryRegion = a.Country, // PostalCode = a.PostalCode, // StateProvince = a.Region //}, Kind = ConvertAddressKind(a.Kind), Accounts = new Account[0] //TODO }); }