show overlay in viewable area

07-10-2017 03:27 PM
New Contributor

I'm trying to get the address of a point on the map.  When the user clicks, I get the location and pass that to my geocoder.  When it returns, I use an overlay to show the return.  If the user click near the left side of the screen, the overlay will show off screen.  The same happens when they click near the top of the screen.  Is there a way to move the overlay so it is always within the viewable area of the map.

Tags (1)
0 Kudos
1 Reply
MVP Regular Contributor

The location of the overlay relative to the input location is based on the HorizontalAlignment and VerticalAlignment of the UserControl.  From your description it seems these are set to Left and Bottom (which I think are default).  You would need to have these as bound properties and based on the location that the point is on the screen it would change the Alignment properties.

0 Kudos