Ejemplo n.º 1
0
 protected ConnectionDragEventArgs(RoutedEvent routedEvent, object source,
                                   ElementItem elementItem, ConnectorItem sourceConnectorItem)
     : base(routedEvent, source)
 {
     _elementItem         = elementItem;
     _sourceConnectorItem = sourceConnectorItem;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 4
0
 public ConnectionDragStartedEventArgs(RoutedEvent routedEvent, object source,
                                       ElementItem elementItem, ConnectorItem connectorItem)
     : base(routedEvent, source, elementItem, connectorItem)
 {
 }
 internal ConnectionDraggingEventArgs(RoutedEvent routedEvent, object source,
                                      ElementItem elementItem, object connection, ConnectorItem connectorItem)
     : base(routedEvent, source, elementItem, connectorItem)
 {
     _connection = connection;
 }