예제 #1
0
 protected async void OnItemTapped(object sender, ItemTappedEventArgs e)
 {
     if (e == null)
     {
         return;
     }
     CantactViewModel model = e.Item as CantactViewModel;
     await Navigation.PushAsync(new FilesPage(model.EmailAddress));
 }
예제 #2
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();
            if (this.contactModelList.Count == 0)
            {
                using (var scope = new ActivityIndicatorScope(activityIndicator, activityIndicatorPanel, true))
                {
                    var graphClient = AuthenticationHelper.GetGraphServiceClient();

                    var contactsList = await graphClient.Me.Contacts.Request().Select("Id,DisplayName,EmailAddresses").GetAsync();

                    foreach (var contact in contactsList)
                    {
                        CantactViewModel model = new CantactViewModel()
                        {
                            Id           = contact.Id,
                            DisplayName  = contact.DisplayName,
                            EmailAddress = contact.EmailAddresses.FirstOrDefault().Address
                        };
                        this.contactModelList.Add(model);
                    }
                }
            }
        }