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

            this.connection = connection;
            this.connection.PropertyChanged += new PropertyChangedEventHandler(AnchorPositionChanged);

            InitializeDragThumbs();

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

            base.Unloaded += new RoutedEventHandler(ConnectionAdorner_Unloaded);
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.MyDesigner = ((ModelEditor.DesignerCanvas)(target));
     return;
     }
     this._contentLoaded = true;
 }
 public SelectionService(DesignerCanvas canvas)
 {
     this.designerCanvas = canvas;
 }