The AllowDrop="True" property prepares the panel as drop enabled. When you start a drag by clicking on the element, the DragDrop.DoDragDrop method written in the OnDrag event initiates the drag and drop operation. It takes the first parameter as a reference to the dependency object, that is, the source of the data being dragged. The second parameter is the data object that contains the data being dragged. And the last parameter is a value that specifies the final effect (DragDropEffects) of the operation.
In the preceding example, when the element is dropped to the drop target, the dragged data retrieved from the DragEventArgs parameter value is first removed from the source and then added to the drop target.