Relative Content

Tag Archive for wpfwpf-controls

Overlapping issue when Panel’s Content exceeds available space, Panel and its Content becomes last layer when comes to overlapping

I am currently developing a card game in WPF, where the user can drag cards from their hand. A dragged card should be always on top when overlapping other controls. Simplifying the problem, lets take a Grid control with 2 children. When comes to overlapping the child (and its contents), which was added to the Grid last, will be the top element. But for some reason when the child’s Content has bigger space demand than actually available for itself, the child and all of its content becomes bottom layer compared to others’ layer level.