Mina Wissa
Mina Wissa

Reputation: 10971

Windows Store Apps ImageMap control?

Is there any Windows Store apps that's similar to ASP.NET ImageMap control

I want to have an image with defined clickable regions, when a region is clicked the event gets fired.

Upvotes: 0

Views: 40

Answers (1)

Riadh Ben Hassine
Riadh Ben Hassine

Reputation: 341

you can use this:

       Image image = new Image();
       image.Source = new BitmapImage(new Uri("ms-appx:///Assets/images.png"));
               image.Width = 50;
               image.Height = 50;
              image.Tapped += new TappedEventHandler(pushpin_tapped); 
              MapLayer.SetPosition(image, new Location(latitude, longitude));

               layer.Children.Add(image);
    private void pushpin_tapped(object sender, TappedRoutedEventArgs e)
    {
        //you can handle your event here
    }

for multiple events or ui-elements you can define a user control.Hope this can help

Upvotes: 1

Related Questions