问题
please I need help with positioning of the mapicon below the mapcontrol.center point like this screenshot here http://www.windowsphone.com/en-us/store/app/sygic-gps-navigation-maps-poi-route-directions/340f7b71-86bc-4f99-8c59-d4a6126c10b1
回答1:
Use NormalizedAnchorPoint
property of the MapIcon
class. It takes a Point
, with x and y ranging from 0 to 1.
Based on your screenshot (3rd one), you should use a value of (0.5, 1).
MapIcon icon = new MapIcon();
icon.NormalizedAnchorPoint = new Point(0.5, 1);
回答2:
I choose a different option by using 'RenderTransform' which enable me to extend the 'MapControl' below the bottom of the page and thereby moving the 'MapIcon' and MapControl center closer to the bottom of the page just as i wanted. Its not clean but it worked.
来源:https://stackoverflow.com/questions/29808480/position-mapicon-below-mapcontrol-center