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

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

            _draggingSourceConnector       = null;
            _draggingConnectionDataContext = null;
        }
Example #4
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;
            }
        }
 internal ConnectionDraggingEventArgs(RoutedEvent routedEvent, object source,
     ElementItem elementItem, object connection, ConnectorItem connectorItem)
     : base(routedEvent, source, elementItem, connectorItem)
 {
     _connection = connection;
 }
Example #6
0
        private void OnConnectorItemDragCompleted(object sender, ConnectorItemDragCompletedEventArgs e)
        {
            e.Handled = true;

            RaiseEvent(new ConnectionDragCompletedEventArgs(ConnectionDragCompletedEvent, this, 
                _draggingSourceConnector.ParentElementItem, _draggingConnectionDataContext,
                _draggingSourceConnector));
             
            _draggingSourceConnector = null;
            _draggingConnectionDataContext = null;
        }
Example #7
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;
        }
 internal ConnectionDragCompletedEventArgs(RoutedEvent routedEvent, object source,
                                           ElementItem elementItem, object connection, ConnectorItem sourceConnectorItem)
     : base(routedEvent, source, elementItem, sourceConnectorItem)
 {
     _connection = connection;
 }
Example #9
0
 public ConnectionDragStartedEventArgs(RoutedEvent routedEvent, object source,
                                       ElementItem elementItem, ConnectorItem connectorItem)
     : base(routedEvent, source, elementItem, connectorItem)
 {
 }
 public ConnectionDragStartedEventArgs(RoutedEvent routedEvent, object source,
     ElementItem elementItem, ConnectorItem connectorItem)
     : base(routedEvent, source, elementItem, connectorItem)
 {
 }