Is there a way to find out which elements a certain element overlaps?
I have a custom canvas that allows elements to be dragged. Howe开发者_JAVA技巧ver I do not want to allow elements to overlap.
you could perform a hit test using the VisualTreeHelper.HitTest method. Here's more info on that: http://msdn.microsoft.com/en-us/library/system.windows.media.geometryhittestparameters(v=VS.100).aspx
Cheers, Alex
精彩评论