示例#1
0
        public void AddActor(string name)
        {
            var header = new Border
            {
                BorderBrush     = Brushes.Black,
                BorderThickness = new Thickness(1),
                Margin          = new Thickness(5),
                CornerRadius    = new CornerRadius(3),
                Padding         = new Thickness(15, 2, 15, 2),
                Child           = new TextBlock {
                    Text = name
                },
                SnapsToDevicePixels = true,
            };

            SeqDiagPanel.SetPosition(header,
                                     Position.OneColumn(_column, 0));
            LayoutRoot.Children.Add(header);

            var line = new Line
            {
                StrokeThickness = 1,
                Y1                  = 0,
                Y2                  = 75,
                X1                  = 0,
                X2                  = 0,
                MinHeight           = 75,
                Stroke              = Brushes.Black,
                Stretch             = Stretch.Fill,
                SnapsToDevicePixels = true,
            };

            SeqDiagPanel.SetPosition(line, Position.Body(_column));
            LayoutRoot.Children.Add(line);
            _column++;
        }
示例#2
0
 private static Border CreateBodyRect(int column)
 {
     return(CreateRect(
                string.Format("({0}, all)", column),
                Position.Body(column)));
 }