Exemplo n.º 1
0
 private NormalCommentView GetNormalEarchView(commentContent cc)
 {
     View.NormalCommentView ncv = new View.NormalCommentView();
     if (cc.userImg != null)
     {
         ncv.usrImg.Source = new BitmapImage(cc.userImg);
     }
     else
     {
         ncv.commentStackPanel.Margin = new Thickness(0);
         ncv.usrImg.Width             = 1;
     }
     ncv.usrTextBox.Text = "#" + cc.count + " " + cc.userName;
     Windows.UI.Xaml.Documents.Run run = new Windows.UI.Xaml.Documents.Run();
     run.Text = cc.content;
     ncv.commentParagraph.Inlines.Add(run);
     return(ncv);
 }
Exemplo n.º 2
0
        private RefCommentView GetRefCommentView(commentContent cc, int i)
        {
            RefCommentView rcv = new RefCommentView();

            rcv.items           = cc;
            rcv.usrNameBox.Text = "#" + cc.count + " " + cc.userName;
            var run = new Run();

            run.Text = cc.content;
            rcv.commentParagraph.Inlines.Add(run);
            if (i > 3)
            {
                rcv.underLine.Visibility = Visibility.Visible;
                // rcv.rootBorder.Visibility = Visibility.Collapsed;
                rcv.rootBorder.BorderThickness = new Thickness(0);
                //  rcv.Margin = new Thickness(3,0,3,0);
            }
            else
            {
                rcv.Margin = new Thickness(3, 1, 3, 1);
            }
            return(rcv);
        }