예제 #1
0
 public ConnectionDragEventArgs(RoutedEvent routedEvent, object source,
                                ElementItem elementItem, ConnectorItem sourceConnectorItem)
     : base(routedEvent, source)
 {
     _elementItem         = elementItem;
     _sourceConnectorItem = sourceConnectorItem;
 }
예제 #2
0
        private void OnConnectorItemDragCompleted(object sender, ConnectorItemDragCompletedEventArgs e)
        {
            e.Handled = true;

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

            _draggingSourceConnector       = null;
            _draggingConnectionDataContext = null;
        }
예제 #3
0
        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;
            }
        }
 public ConnectionDragStartedEventArgs(RoutedEvent routedEvent, object source,
     ElementItem elementItem, ConnectorItem connectorItem)
     : base(routedEvent, source, elementItem, connectorItem)
 {
 }
 internal ConnectionDragCompletedEventArgs(RoutedEvent routedEvent, object source,
                                           ElementItem elementItem, object connection, ConnectorItem sourceConnectorItem)
     : base(routedEvent, source, elementItem, sourceConnectorItem)
 {
     _connection = connection;
 }