Hello, I would like to enquire on a solution to the scenario as per title. Below is what I have currently, which obviously doesn't work as the Drop is just 1 event itself. If I accept, everything will be accepted, and if I reject, everything will be rejected at once.
private void ListBoxIssue_OnPreviewDrop(object sender, DragEventArgs e)
{
var droppedObject = DragDropPayloadManager.GetDataFromObject(e.Data, typeof(CommsItem));
List<
CommsItem
> listCommsItem = ((List<
object
>) droppedObject).Cast<
CommsItem
>().ToList();
//droppedObject is an object, which is of List<
Object
>, which the objects in the list are CommsItem
foreach (CommsItem commsItem in listCommsItem)
{
if (commsItem.Serial == "2008")
{
e.Handled = true;
e.Effects = DragDropEffects.None;
}
else
{
e.Handled = false;
e.Effects = DragDropEffects.All;
}
}
}