/// <summary>
 /// Raises the DragCompleted event.
 /// </summary>
 /// <param name="args">Information about the event.</param>
 private static void OnDragCompleted(DragDropCompletedEventArgs args)
 {
     _dragOperationInProgress = null;
     EventHandler<DragDropCompletedEventArgs> handler = DragDropCompleted;
     if (handler != null)
     {
         handler(null, args);
     }
 }
Example #2
0
        private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            var isDropSuccessful = DragDropPayloadManager.GetDataFromObject(e.Data, "IsDropSuccessful");

            if (isDropSuccessful != null && (bool)isDropSuccessful)
            {
                var data = DragDropPayloadManager.GetDataFromObject(e.Data, "DragData");
                ((IList)(sender as RadListBox).ItemsSource).Remove(data);
            }

            e.Handled = true;
        }
        private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            var draggedItem = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedData");

            if (e.Effects != DragDropEffects.None)
            {
                var collection = (sender as ListBox).ItemsSource as IList;
                collection.Remove(draggedItem);
            }
        }
Example #4
0
        private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            object draggedItem = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedData");

            if (e.Effects != DragDropEffects.None)
            {
                var gridView = sender as RadGridView;
                if (gridView != null)
                {
                    var collection = gridView.ItemsSource as IList;
                    if (collection != null) collection.Remove(draggedItem);
                }
            }
        }
 private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
 {
     (sender as TextBox).Text = "";
 }
        private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            var draggedItem = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedData");

            if (draggedItem == null)
            {
                var listBox = sender as ListBox;
                if (listBox != null)
                {
                    var collection = listBox.ItemsSource as IList;
                    foreach (var item in _CollectorForAdd)
                    {
                        if (collection != null) collection.Remove(item);
                    }
                }
            }
        }
        private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            RadDiagramShape shapeUnderDragPosition = this.diagram.GetShapeUnderDragPosition();
            if (shapeUnderDragPosition == null) return;

            if (e.OriginalSource is OrgChartTeamMember)
            {
                OrgTeamMemberViewModel draggedModel = (OrgTeamMemberViewModel)(e.OriginalSource as OrgChartTeamMember).DataContext;
                OrgTeamViewModel targetModel = (OrgTeamViewModel)shapeUnderDragPosition.DataContext;

                if (targetModel != draggedModel.Team)
                    this.viewModel.OpenDropMembersDialog(targetModel, draggedModel);
            }
        }
		private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
		{
			if (e.Effects != DragDropEffects.None && this.isTreeSource)
			{
				var data = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedData");

				this.sourceItems.Remove(data);
			}
		}
        private static void ToolBarDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            RadToolBar toolBar = e.Source as RadToolBar;
            DragDropInfo info = GetDragDropInfo(e.Data);
            if (toolBar == null || info == null)
            {
                return;
            }

            DragDropManager.RemoveDragDropCompletedHandler(info.ToolBar, ToolBarDragDropCompleted);
            DragDropManager.RemoveGiveFeedbackHandler(info.ToolBar, ToolBarGiveFeedback);

            ClearActiveToolBarStyle(info.ToolBar);
            ClearHitTesting(info.Tray.Items);
            CloseHost(info);
            if (info.DragVisual.Child != null)
            {
                info.DragVisual.Child = null;

                Window dragVisualWindow = Window.GetWindow(info.DragVisual);

                InitializeHost(info.ToolBar, dragVisualWindow.Left, dragVisualWindow.Top);
            }

            HideNewBandIndicator(info.Tray);

            e.Handled = true;
        }
Example #10
0
        private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            var draggedItem = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedData");

            if (e.Effects != DragDropEffects.None)
            {
                var listBox = sender as System.Windows.Controls.ListBox;
                if (listBox != null)
                {
                    var collection = listBox.ItemsSource as IList;
                    if (collection != null) collection.Remove(draggedItem);
                }
            }
        }
        private static void ToolBarDragDropCompleted(object sender, DragDropCompletedEventArgs e)
        {
            RadToolBar toolBar = e.Source as RadToolBar;
            DragDropInfo info = GetDragDropInfo(e.Data);
            if (toolBar == null || info == null)
            {
                return;
            }

            DragDropManager.RemoveDragDropCompletedHandler(info.ToolBar, ToolBarDragDropCompleted);

            ClearActiveToolBarStyle(info.ToolBar);
            ClearHitTesting(info.Tray.Items);          

            HideNewBandIndicator(info.Tray);

            e.Handled = true;
        }
		private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
		{
		}
        private void OnDragComplete(object sender, DragDropCompletedEventArgs e)
        {
            if (!this.keepBackground)
                this.OnHeaderElementLeave();

            this.swimlaneDiagram.HideDragOverVisual();
            this.keepBackground = false;
        }