Example #1
0
 public RubberbandAdorner(DesignerCanvas designerCanvas, Point? dragStartPoint)
   : base(designerCanvas)
 {
   this.designerCanvas = designerCanvas;
   startPoint = dragStartPoint;
   rubberbandPen = new Pen(Brushes.LightSlateGray, 1);
   rubberbandPen.DashStyle = new DashStyle(new double[] {2}, 1);
 }
Example #2
0
 public ConnectorAdorner(DesignerCanvas designer, Connector sourceConnector)
   : base(designer)
 {
   designerCanvas = designer;
   this.sourceConnector = sourceConnector;
   drawingPen = new Pen(Brushes.LightSlateGray, 1);
   drawingPen.LineJoin = PenLineJoin.Round;
   Cursor = Cursors.Cross;
 }
Example #3
0
    public ConnectionAdorner(DesignerCanvas designer, Connection connection)
      : base(designer)
    {
      designerCanvas = designer;
      adornerCanvas = new Canvas();
      visualChildren = new VisualCollection(this);
      visualChildren.Add(adornerCanvas);

      this.connection = connection;
      this.connection.PropertyChanged += AnchorPositionChanged;

      InitializeDragThumbs();

      drawingPen = new Pen(Brushes.LightSlateGray, 1);
      drawingPen.LineJoin = PenLineJoin.Round;

      Unloaded += ConnectionAdorner_Unloaded;
    }