public override void Draw(StreamGeometryContext context, Connection connection) { if (connection.SourceConnectionPoint == null || connection.TargetConnectionPoint == null) { context.BeginFigure(connection.StartPoint, true, false); context.LineTo(connection.EndPoint, true, true); } else if(connection.Source == connection.Target) { Point startPoint = connection.SourceEndPoint.EndPoint; Point midPoint = connection.SourceConnectionPoint.LineAwayFromThisTo(startPoint, 50); context.BeginFigure(startPoint, true, true); context.ArcTo(midPoint, new Size(50, 50), 180, false, SweepDirection.Clockwise, true, true); context.ArcTo(startPoint, new Size(50, 50), 180, false, SweepDirection.Clockwise, true, true); } else { Point startPoint = connection.SourceEndPoint.EndPoint; Point endPoint = connection.TargetEndPoint.EndPoint; context.BeginFigure(startPoint, true, false); context.LineTo(endPoint, true, true); } }
public void Draw(StreamGeometryContext context, Connection connection) { Point startPoint = connection.SourceEndPoint.EndPoint; Point endPoint = connection.TargetEndPoint.EndPoint; context.BeginFigure(startPoint, true, false); context.LineTo(endPoint, true, true); }
public ConnectionDragger(DiagramSurface surface, MainWindow window, Point startPoint, Connection originalConnection, bool isStartOfConnection) : base(surface, window, startPoint) { _OriginalConnection = originalConnection; _IsStartOfConnection = isStartOfConnection; _OriginalConnectionPoint = isStartOfConnection ? originalConnection.SourceConnectionPoint : originalConnection.TargetConnectionPoint; _OriginalConnectionBrush = _OriginalConnection.Stroke; SetupMouse(); }
public static void SetConnectionStartPointBinding(Connection connection, ConnectionPoint connPoint) { if (connPoint == null) throw new ArgumentNullException("connPoint"); connection.SetBinding(StartPointProperty, new Binding { Source = connPoint, Path = new PropertyPath(ConnectionPoint.LocationProperty) }); connection.SourceConnectionPoint = connPoint; }
public static void SetConnectionPointBinding(Connection connection, ConnectionPoint sourceConnPoint, ConnectionPoint targetConnPoint) { SetConnectionStartPointBinding(connection, sourceConnPoint); SetConnectionEndPointBinding(connection, targetConnPoint); }
public void SetVisibility(Connection connection, Visibility visibility) { visibleConnections.Remove(connection); if (visibility == Visibility.Visible) visibleConnections.Add(connection); }
public void RemoveConnection(Connection connection) { Schema.RemoveConnection(connection); connection.Visible = false; }
public void ConnectionSelected(Connection entity) { OnConnectionSelected.RaiseEvent(this, new SchemaEventArgs<Connection>(entity)); }
public void AddConnection(Connection connection) { Schema.AddConnection(connection); connection.Visible = false; }
public TextShapeDecoration(Connection decoratedShape) : base(decoratedShape) { TextSize = 12; parent = decoratedShape; }
public abstract void Draw(StreamGeometryContext context, Connection connection);
public virtual void CustomSetupConnectorEndPoint(Connection connection) { throw new System.InvalidOperationException("This class does not implement a custom Connector Endpoint Setup routine"); }
public void RemoveConnection(Connection connection) { _Connections.Remove(connection); }
public void AddConnection(Connection connection) { if(_Connections.Contains(connection) == false) _Connections.Add(connection); }
public void CustomSetupConnectorEndPoint(Connection connection) { connection.SourceCardinalityConverter = new InheritanceCardinalityConverter(); }