KbtterWPF.ExListWindow.CreateListPanel C# (CSharp) Method

CreateListPanel() public method

public CreateListPanel ( TweetSharp.TwitterList list ) : UIElement
list TweetSharp.TwitterList
return UIElement
        public UIElement CreateListPanel(TwitterList list)
        {
            var s = new StackPanel();
            var si = new StackPanel();
            s.Orientation = Orientation.Horizontal;
            Image img = new Image { Width = 36, Height = 36 };
            BitmapImage bi = new BitmapImage(new Uri(list.User.ProfileImageUrlHttps));
            img.Source = bi;
            s.Children.Add(img);

            var ti = new TextBlock { FontSize = 20 };
            ti.Text = (list.Mode == "private" ? "*" : "") + list.Name;
            ti.TextWrapping = TextWrapping.Wrap;
            var de = new TextBlock { Foreground = Brushes.Gray };
            de.Text = list.Description;
            de.TextWrapping = TextWrapping.Wrap;
            var cn = new TextBlock();
            cn.Text = list.MemberCount.ToString() + "人が追加されています";
            si.Children.Add(ti);
            si.Children.Add(cn);
            si.Children.Add(de);
            s.Children.Add(si);
            s.Tag = list;
            return s;
        }