private void Like(object sender, RoutedEventArgs e) { if (_posts.Count > 0) { if (_tempLike == false) { btnLike.BorderBrush = Brushes.WhiteSmoke; _tempLike = true; _postBLL.AddLike(_userBLL.LoginRead(), _current_post.Id); } else { btnLike.BorderBrush = Brushes.Transparent; _tempLike = false; _postBLL.DismissLike(_userBLL.LoginRead(), _current_post.Id); } btnLikers.Content = "Liked by: " + _postBLL.GetNumOfLikes(_current_post.Id).ToString(); btnComments.Content = "View comments " + _postBLL.GetWhoCommented(_current_post.Id).Count; } else { btnLike.BorderBrush = Brushes.Transparent; _tempLike = false; } }