private bool LoadInfo() { try { // Get the user IUser user = instagram.GetUserById(userLoaded.Id); if (user == null) { return(false); } IRelationship rd = instagram.GetFriendShipWith(user.Id); string name = user.FullName; int followersNum = user.FollowedBy; int followingNum = user.Follows; string description = user.Bio; Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Render, new Action(() => { InfoAboutBox.Header = "Acerca de " + user.Username; UserName.Content = name; UserDescription.Text = description; NumFollowers.Content = followersNum; NumFollowing.Content = followingNum; var link = new Hyperlink(new Run("@" + user.Username)) { NavigateUri = new Uri("https://www.instagram.com/" + user.Username) }; // Open the account uri on an externar browser link.RequestNavigate += (o, e) => { e.Handled = true; Process.Start(e.Uri.ToString()); }; LinkToProfile.Content = link; if (rd.OutgoingRelation == OutgoingRelationshipStatus.Follows) { RelationshipInfo.Content = "TE SIGUE"; Unfollow.IsEnabled = true; Unfollow.Click += (s, e) => InstagramUI_Users.Unfollow(userLoaded, instagram); Follow.IsEnabled = false; } else if (rd.OutgoingRelation == OutgoingRelationshipStatus.None) { if (rd.IngoingRelation == IngoingRelationshipStatus.RequestedBy) { RelationshipInfo.Content = "ESPERANDO TU RESPUESTA"; Follow.IsEnabled = true; Follow.Click += (s, e) => InstagramUI_Users.Approve(userLoaded, instagram); Unfollow.IsEnabled = false; Unfollow.IsEnabled = true; Unfollow.Click += (s, e) => InstagramUI_Users.Ignore(userLoaded, instagram); Follow.IsEnabled = false; } else { Follow.IsEnabled = true; Follow.Click += (s, e) => InstagramUI_Users.Follow(userLoaded, instagram); Unfollow.IsEnabled = false; } } else if (rd.OutgoingRelation == OutgoingRelationshipStatus.Requested) { RelationshipInfo.Content = "SOLICITUD ENVIADA"; } })); return(true); } catch (Exception) { return(false); } }