Custom Pushpin Shape

May 4, 2010 at 2:19 PM

Hie

How can I create a circular pushpin instead of the default rectangular pushpin. Tried to read some posts here but non worked for me.

QV

 

May 5, 2010 at 8:07 AM
Edited May 19, 2010 at 7:36 AM

Hi, You would need to derive from the SurfaceVEPushpin, and then override the UpdatePosition method (not exactly sure of the method name) to change you custom pushpin position if you want to be able to center it for instance.

The important line in creating your own Pushpin is to override the StyleKey property with DefaultStyleKeyProperty.OverrideMetadata in the constructor (look at the SurfaceVePushPin.cs in InfoStrat.VE.NUI/SurfaxceVEMap).

Once done, dont' forget also to load corresponding derived control style using resources (with the targeting set to sonmething like <Style TargetType="{x:Type local:myVEMapPushPin}"> Cheers, Ben.

May 5, 2010 at 1:43 PM

Thank You JaYmZ666

I checked out the files you suggested. I get the idea, will try it and give you a shout

Thanks again!