/// <inheritdoc /> public ConnectionAdorner(WidgetPanel panel, Connection connection) : base(panel) { _widgetPanel = panel; _adornerCanvas = new Canvas(); _visualChildren = new VisualCollection(this) { _adornerCanvas }; _connection = connection; var spd = DependencyPropertyDescriptor.FromProperty(Connection.SourceAnchorPositionProperty, typeof(Connection)); spd.AddValueChanged(_connection, SourceAnchorPositionChanged); spd = DependencyPropertyDescriptor.FromProperty(Connection.TargetAnchorPositionProperty, typeof(Connection)); spd.AddValueChanged(_connection, TargetAnchorPositionChanged); InitializeDragThumbs(); _drawingPen = new Pen(Brushes.LightSlateGray, 1) { LineJoin = PenLineJoin.Round }; }
/// <inheritdoc /> public RubberbandAdorner(WidgetPanel widgetPanel, Point?dragStartPoint) : base(widgetPanel) { _widgetPanel = widgetPanel; _startPoint = dragStartPoint; _rubberbandPen = new Pen(Brushes.LightSlateGray, 1) { DashStyle = new DashStyle(new double[] { 2 }, 1) }; }
/// <inheritdoc /> public ConnectorAdorner(WidgetPanel panel, Connector sourceConnector) : base(panel) { _widgetPanel = panel; _sourceConnector = sourceConnector; _drawingPen = new Pen(Brushes.LightSlateGray, 1) { LineJoin = PenLineJoin.Round }; Cursor = Cursors.Cross; }