private void AddRectangleToStackPanel(IBaseRectangle br, string text = "")
        {
            Grid      grid = new Grid();
            TextBlock tb   = new TextBlock();

            tb.Text = text;
            tb.VerticalAlignment = VerticalAlignment.Bottom;
            tb.Foreground        = new SolidColorBrush(Colors.White);
            tb.Margin            = new Thickness(15);
            tb.TextWrapping      = TextWrapping.WrapWholeWords;

            grid.Width  = 250;
            grid.Height = 110;
            grid.Children.Add(br.CreateBaseRectangle());
            grid.Children.Add(tb);
            grid.HorizontalAlignment = HorizontalAlignment.Center;

            decoratorContent.Children.Add(grid);
        }
Esempio n. 2
0
 public FillDecorator(IBaseRectangle br, SolidColorBrush brush)
 {
     baseRect       = br;
     fillColorBrush = brush;
 }
Esempio n. 3
0
 public StrokeDecorator(IBaseRectangle br, SolidColorBrush brush, int stroke)
 {
     baseRect         = br;
     strokeColorBrush = brush;
     strokeThickness  = stroke;
 }