Map control -- popup is shown behind pin in UWP

Pramod Garikapati 1 Reputation point
2020-08-26T10:21:48.847+00:00

20479-map-issue.jpgHi Team,

i created a sample UWP application with a map and bind ItemsSource to locations. When i click any location i need to show a TextBlock with clicked pin info, but the TextBlock is going behind the pins.

Can someone please look into this and let me know what i am doing wrong here please.

sample project can be downloaded from https://1drv.ms/u/s!AiRUJ-H3vDEwgYgbI3nhZ-lvU8EZKg?e=6qPu4C and screen shot is attached for reference.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,866 Reputation points
    2020-08-26T13:44:03.777+00:00

    Hello, Welcome to Microsoft Q&A,

    I'm afraid you can't set the custom xaml elements on top of map, because currently, it does not provide such zindex property. So for this scenario, we suggest place the TextBlock in the MapItemsControl's DataTemplate, and give it left top value that to make sure the pin element will not covered.

    For detail please refer code sample here.

    Thanks

    Nico Zhu

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.