ThinkGeo.com    |     Documentation    |     Premium Support

How to change Popup positioning

Hi
We want to change the orientation of the Popup so that when clicking near the boundary of the map it is not displayed outside the map.

Currently Our popup is just displayed above the item clicked, with the arrow pointing downwards towards the point. But if we click near the top of the map obviously the popup is not visible, and the engine doesn’t know to display is underneath the item instead (with the arrow pointing upwards).

There was already a topic for this, but the advice links to a page that no longer exists.

Please help! We would prefer to not have to have dynamic styling of the popup, because your sample does not have a reference for how to re-implement the xaml and behaviors. Currently we do not style the popup or change it’s default behavior, we only style the Content inside.

Hi Nathan,

The post mentioned in it is: Custom Popup Styling

But it’s not very helpful for your scenario.

Our developer build a sample for you, you can refer the sample, and modify the logic follow your requirement.

When you pan the map, the popup will change it’s direction when it touch the top edge.

AutoOrientationPopup_Wpf.zip (17.8 KB)

Wish that’s helpful.

Regards,

Ethan