private void OnDragOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e) { var formats = DragDropPayloadManager.GetFormats(e.Data, true); if (formats.Contains(typeof(string).FullName)) { e.Effects = DragDropEffects.Move; } else { e.Effects = DragDropEffects.None; } e.Handled = true; }
private void ListDropComplete(object sender, DragDropCompletedEventArgs e) { if (e.Effects != DragDropEffects.None) { var formats = DragDropPayloadManager.GetFormats(e.Data) as string[]; if (formats.Length > 0) { var options = DragDropPayloadManager.GetDataFromObject(e.Data, formats[0]) as IList; if (options.Count > 0) { ApplicationModule optianModule = options[0] as ApplicationModule; if (sender == listBox1) { ViewModel.AppUnRelationModule(optianModule.ModuleID); } else if (sender == listBox2) { ViewModel.AppRelationModule(optianModule.ModuleID); } } } } }