Search code examples
windows-phone-7buttonbing-mapspushpin

How can I make button appears above pushpin when pushpin is clicked in bing maps?


It should be look like this. When pushpin is clicked.

enter image description here

This is my XAML.

<my:Pushpin Name="pin1" Location="60.285323,24.943501" Template="{StaticResource normalPushPin}" MouseLeftButtonUp="Location1_Popup"/>

This my Location1_Popup method. I don't know what to write.

private void Location1_Popup(object sender, MouseButtonEventArgs e)
    {
        MessageBox.Show("Location1 has been clicked");
    }

Thanks in advance.


Solution

  • You need to make now your popup visible in the MouseDown Event.

    For examples, please have a look the sourcecode.

    http://www.windowsphonegeek.com/upload/articles/WPPinPopup-Alternatives.zip

    enter image description here

    private void Location1_Popup(object sender, MouseButtonEventArgs e)
        {
            BlackRegionWithContent.Visible = Visibility.Visible;
        }