private async void Share_click4(object sender, RoutedEventArgs e) { var dc = (sender as FrameworkElement).DataContext; var item = (MyList4_.ContainerFromItem(dc) as ListViewItem).Content as FriendList; sharetitle = item.NickName; sharedescription = "这是我的好朋友"; shareimg = await Package.Current.InstalledLocation.GetFileAsync("Assets\\weixin256.png"); DataTransferManager.ShowShareUI(); }
private void Add_Click3(object sender, RoutedEventArgs e) { var dc = (sender as FrameworkElement).DataContext; var item = (MyList4_.ContainerFromItem(dc) as ListViewItem).Content as FriendList; if (item != null) { foreach (var member in ContactView.AllItems) { if (member.UserName == item.UserName) { return; } } ContactView.AllItems.Insert(0, item); } }