Hi,
I am trying to prevent dropping of items on level other than their own , i.e., items on a specific level cannot be moved to level above or below). For this, I am working with PreviewDragEnded and if the item is not being dropped to the same level, i prevent it by setting e.Handled to true. It works fine when DropPosition is DropPosition.Inside. However, when the DropPosition is After or Before, the TargetDropItem is null ,for some reason, and I cannot check the level to which the item is dropped. The TargetDropItem gets a value on DragEnded event but it's already too late. Is there a way to do it?
Thank you,
Tal
I am trying to prevent dropping of items on level other than their own , i.e., items on a specific level cannot be moved to level above or below). For this, I am working with PreviewDragEnded and if the item is not being dropped to the same level, i prevent it by setting e.Handled to true. It works fine when DropPosition is DropPosition.Inside. However, when the DropPosition is After or Before, the TargetDropItem is null ,for some reason, and I cannot check the level to which the item is dropped. The TargetDropItem gets a value on DragEnded event but it's already too late. Is there a way to do it?
Thank you,
Tal