0

Is there a away to get XAML children with offset or Geolocation? Like the builtin function of the MapControl

MapControl.FindMapElementsAtOffset(Point p)
user3136572
  • 134
  • 10

1 Answers1

1

Since the map control doesn't know the extent of the XAML element, it can't hit test them. XAML elements are only pinned to the map at a single point which is all the map control knows about. You could try VisualTreeHelper.FindElementsInHostCoordinates https://learn.microsoft.com/en-us/uwp/api/Windows.UI.Xaml.Media.VisualTreeHelper#Windows_UI_Xaml_Media_VisualTreeHelper_FindElementsInHostCoordinates_Windows_Foundation_Point_Windows_UI_Xaml_UIElement_

Duncan Lawler
  • 1,772
  • 8
  • 13