private void CommentToComment_Tapped(object sender, System.Windows.Input.GestureEventArgs e)
{
FrameworkElement control = sender as FrameworkElement;
if (control == null)
return;
CommentViewModel model = control.DataContext as CommentViewModel;
if (model == null)
return;
String content = null;
EntryType type = model.Type;
if (type == EntryType.SinaWeibo)
{
content = String.Format("回复@{0}: ", model.Title);
}
else if (type == EntryType.Renren)
{
content = String.Format("回复{0}: ", model.Title);
}
else if (type == EntryType.Douban)
{
content = String.Format("@{0}: ", model.DoubanUID);
}
else if (type == EntryType.NotSet)
{
return;
}
StringBuilder sb = new StringBuilder();
sb.AppendFormat("/Views/Common/PostCommentView.xaml?Content={0}",
content);
NavigationService.Navigate(new Uri(sb.ToString(), UriKind.Relative));
}