Exemple #1
0
 public BorderedRectangle(Canvas cvs) : base(cvs)
 {
     rect.Fill            = new SolidColorBrush(RandomColorGenerator.RandomColor());
     rect.StrokeDashArray = new DoubleCollection {
         4.0, 2.0
     };
     rect.Stroke = new SolidColorBrush(Colors.Black);
 }
Exemple #2
0
 public ShapeRectangle()
 {
     rect                      = new Rectangle();
     rect.Height               = rnd.Next(40, 50);
     rect.Width                = rnd.Next(80, 100);
     rect.StrokeThickness      = 1;
     rect.MouseLeftButtonDown += onMouseDown;
     rect.MouseUp             += onMouseUp;
     rect.MouseMove           += onMouseMove;
     rect.Fill                 = new SolidColorBrush(RandomColorGenerator.RandomColor());
     rect.Stroke               = new SolidColorBrush(Colors.Gray);
 }
Exemple #3
0
 public ShapeLine()
 {
     line = new Line();
     line.StrokeEndLineCap = PenLineCap.Triangle;
     line.StrokeThickness  = 3;
     _myColor           = RandomColorGenerator.RandomColor();
     line.Stroke        = new SolidColorBrush(_myColor);
     lR                 = new Line();
     lL                 = new Line();
     lR.Stroke          = new SolidColorBrush(_myColor);
     lL.Stroke          = new SolidColorBrush(_myColor);
     lR.StrokeThickness = 3.00;
     lL.StrokeThickness = 3.00;
 }