protected ConnectionDragEventArgs(RoutedEvent routedEvent, object source,
                                   ElementItem elementItem, ConnectorItem sourceConnectorItem)
     : base(routedEvent, source)
 {
     _elementItem         = elementItem;
     _sourceConnectorItem = sourceConnectorItem;
 }
 public ConnectionDraggingEventArgs(RoutedEvent routedEvent,
                                    object source,
                                    ElementItem elementItem,
                                    object connection,
                                    ConnectorItem connectorItem) : base(routedEvent, source, elementItem, connectorItem)
 {
     Connection = connection;
 }
        private void OnConnectorItemDragCompleted(object sender, ConnectorItemDragCompletedEventArgs e)
        {
            e.Handled = true;

            RaiseEvent(new ConnectionDragCompletedEventArgs(ConnectionDragCompletedEvent, this,
                                                            _draggingSourceConnector.ParentElementItem, _draggingConnectionDataContext,
                                                            _draggingSourceConnector));

            _draggingSourceConnector       = null;
            _draggingConnectionDataContext = null;
        }
        private void OnConnectorItemDragStarted(object sender, ConnectorItemDragStartedEventArgs e)
        {
            e.Handled = true;

            _draggingSourceConnector = (ConnectorItem)e.OriginalSource;

            var eventArgs = new ConnectionDragStartedEventArgs(ConnectionDragStartedEvent, this,
                                                               _draggingSourceConnector.ParentElementItem, _draggingSourceConnector);

            RaiseEvent(eventArgs);

            _draggingConnectionDataContext = eventArgs.Connection;

            if (_draggingConnectionDataContext == null)
            {
                e.Cancel = true;
            }
        }
Example #5
0
 public ConnectionDragStartedEventArgs(RoutedEvent routedEvent,
                                       object source,
                                       ElementItem elementItem,
                                       ConnectorItem connectorItem) : base(routedEvent, source, elementItem, connectorItem)
 {
 }
Example #6
0
 public ConnectionDragCompletedEventArgs(RoutedEvent routedEvent, object source,
                                         ElementItem elementItem, object connection, ConnectorItem sourceConnectorItem)
     : base(routedEvent, source, elementItem, sourceConnectorItem)
 {
     _connection = connection;
 }