private void OnItemChanged(ActivityItem item)
        {
            if(item == null)
            {
                return;
            }
            MainTextBlock.Inlines.Clear();

            Hyperlink userHyperlink = new Hyperlink();
            userHyperlink.Inlines.Add(new Run { Text = item.NickName });
            userHyperlink.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x66, 0xB3, 0xFF));
            userHyperlink.UnderlineStyle = UnderlineStyle.None;
            userHyperlink.Click += HyperlinkClick;
            userHyperlink.SetValue(NameProperty, "user");
            MainTextBlock.Inlines.Add(userHyperlink);

            MainTextBlock.Inlines.Add(new Run() { Text = ConverterType(item.Type) });

            if (item.TargetLink != null)
            {
                if (item.TargetLink.Item1 == "notebook" || item.TargetLink.Item1 == "collection")
                {
                    MainTextBlock.Inlines.Add(new Run() { Text = item.Target, FontWeight = new FontWeight() { Weight = 700 } });
                }
                else
                {
                    Hyperlink targetHyperlink = new Hyperlink();
                    targetHyperlink.Inlines.Add(new Run { Text = item.Target });
                    targetHyperlink.UnderlineStyle = UnderlineStyle.None;
                    targetHyperlink.Click += HyperlinkClick;
                    targetHyperlink.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x66, 0xB3, 0xFF));
                    targetHyperlink.SetValue(NameProperty, "target");
                    MainTextBlock.Inlines.Add(targetHyperlink);
                }
            }
        }
 private ActivityItem ConvertToActivityItem(ActivityResult source)
 {
     ActivityItem result = new ActivityItem();
     if(source.Source.Object.Avatar.EndsWith("default_avatar.png"))
     {
         result.Avatar = new Uri("ms-appx:///Assets/default_avatar.png", UriKind.Absolute);
     }
     else
     {
         result.Avatar = new Uri(source.Source.Object.Avatar.ToString(), UriKind.Absolute);
     }
     result.NickName = source.Source.Object.Nickname;
     result.UserLink = new Tuple<string, string>(item1: "user", item2: source.Source.Object.Slug);
     result.ActivityId = source.Id;
     result.CreatedAt = source.CreatedAt;
     if(source.Event == "like_something")
     {
         if(source.Target.Type == "User")
         {
             result.Type = ActivityType.FollowUser;
             result.Target = source.Target.Object.Nickname;
             result.TargetLink = new Tuple<string, string>(item1: "user", item2: source.Target.Object.Slug);
         }
         else if(source.Target.Type == "Note")
         {
             result.Type = ActivityType.LikeNote;
             result.Target = source.Target.Object.Title;
             result.TargetLink = new Tuple<string, string>(item1: "note", item2: source.Target.Object.Slug);
         }
         else if(source.Target.Type == "Notebook")
         {
             result.Type = ActivityType.LikeNoteBook;
             result.Target = source.Target.Object.Title ?? source.Target.Object.Name;
             result.TargetLink = new Tuple<string, string>(item1: "notebook", item2:"Nothing"/*item2: source.Target.Object.Notebook.Slug*/);
         }
         else if(source.Target.Type == "Collection")
         {
             result.Type = ActivityType.LikeCollection;
             result.Target = source.Target.Object.Title ?? source.Target.Object.Name;
             result.TargetLink = new Tuple<string, string>(item1: "collection", item2: "Nothing"/*item2: source.Target.Object.Slug*/);
         }
     }
     else if(source.Event == "comment_on_note")
     {
         result.Type = ActivityType.Comment;
         result.Target = source.Target.Object.Note.Title;
         result.Content = source.Target.Object.CompiledContent;
         result.TargetLink = new Tuple<string, string>(item1: "comment_on_note", item2: source.Target.Object.Note.Slug);
     }
     else if(source.Event == "user_created")
     {
         result.Type = ActivityType.Created;
     }
     else if(source.Event == "share_note")
     {
         result.Type = ActivityType.Note;
         result.Target = source.Target.Object.Title;
         result.TargetLink = new Tuple<string, string>(item1: "share_note", item2: source.Target.Object.Slug);
     }
     return result;
 }