user2329125
user2329125

Reputation:

Make clickable UI-elements for windows Phone 8.1 apps maps

Windows Phone 8.1 App , C#

I would like to let the user add Pushpins ( which apparently are called MapIcons ) to the map and when the user clicks the newly created Pushpin some other ui-elements should appear.

But apparently MapIcons are not clickable and you can not inherit from them since they are sealed, so no luck in making them clickable.

I tried to just extend from Windows.UI.Xaml.Controls.Button , but those have not Location, probably because they do not belong to the Windows.UI.Xaml.Controls.Maps-namespace. So I can not really add them to the Windows.UI.Xaml.Controls.Maps.MapControl.Children or Windows.UI.Xaml.Controls.Maps.MapControl.MapElements, since they will not be on the map where I would want them to be.

So how do you make a clickable ui-element that I can give a location on the map?

Upvotes: 1

Views: 339

Answers (1)

Chris W.
Chris W.

Reputation: 23280

You can throw pretty much anything you want on there and just bind to the MapControl.Location attached property for the object placement as long as they're children of a map parent.

See more detail explanation here in the docs.

Upvotes: 2

Related Questions