internal bool InternalDropMove(DragEventArgs args)
{
// Children first (Order by Z-Order)
bool passive = false;
foreach (var child in Children.InZOrder())
{
args.LocalPosition = CalculateLocalPosition(args.GlobalPosition, child);
bool handled = child.InternalDropMove(args);
passive |= handled;
args.Bubbled = handled || args.Bubbled;
}
args.LocalPosition = CalculateLocalPosition(args.GlobalPosition, this);
bool hovered =
args.LocalPosition.X >= 0 &&
args.LocalPosition.Y >= 0 &&
args.LocalPosition.X < ActualSize.X &&
args.LocalPosition.Y < ActualSize.Y;
// Wenn sich der DropHover Status verändert hat
if ((hovered && ScreenManager.Dragging) != dropHovered)
{
if (dropHovered)
{
OnDropLeave(args);
if (DropLeave != null)
DropLeave(args);
}
else
{
OnDropEnter(args);
if (DropEnter != null)
DropEnter(args);
}
}
OnDropMove(args);
if (DropMove != null)
DropMove(args);
dropHovered = hovered && ScreenManager.Dragging;
return hovered;
}