예제 #1
0
 public HighlightingTextListBoxItem(Microsoft.SPOT.Font font, string content)
     : base()
 {
     this.text = new Text(font, content);
     this.text.SetMargin(2);
     this.Child = this.text;
 }
예제 #2
0
        public HighlightingRoundTextListBoxItem(Microsoft.SPOT.Font font, string content)
            : base()
        {
            this.selectionColor = Colors.Blue;

            this.backgroundShape        = new Ellipse(13, 13);
            this.backgroundShape.Stroke = new Pen(Color.Black, 1);
            this.backgroundShape.HorizontalAlignment = HorizontalAlignment.Center;
            this.backgroundShape.VerticalAlignment   = VerticalAlignment.Center;

            this.text = new Text(font, content);
            this.text.HorizontalAlignment = HorizontalAlignment.Center;
            this.text.VerticalAlignment   = VerticalAlignment.Center;
            this.text.SetMargin(2);

            Panel panel = new Panel();

            panel.Children.Add(this.backgroundShape);
            panel.Children.Add(this.text);

            this.Child = panel;
        }