Exemplo n.º 1
0
        private void OnDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs args)
        {
            var data = ((DataObject)args.Data).GetData("DragData");

            var param = new DragDropParameter
            {
                DraggedItem = data,
                ItemsSource = this.AssociatedObject.ItemsSource
            };

            if (this.DropCommand != null && this.DropCommand.CanExecute(param))
            {
                this.DropCommand.Execute(param);
            }
        }
Exemplo n.º 2
0
        private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs args)
        {
            var data = DragDropPayloadManager.GetDataFromObject(args.Data, "DragData");

            var param = new DragDropParameter
            {
                DraggedItem = data,
                ItemsSource = this.AssociatedObject.ItemsSource
            };

            if (this.DragCommand != null && this.DragCommand.CanExecute(param))
            {
                this.DragCommand.Execute(param);
            }
        }