Surface VE Push Pin -- Click on items inside?

Nov 25, 2009 at 11:59 PM

I have a SurfaceVEPushPin on the map. I can register for and receive click events for it. I would like to be able to click on its Content through. Right now the push pin itself seems to be eating the events. Is this even possible?

Alternatively I would like to be able to put a usercontrol on the map and have that be clickable, but if I add it to the Items collection of the map, it just appears to be part of the map.



Nov 26, 2009 at 12:58 AM

You can either create a control that inherits from SurfaceVEPushPin and reskin it as you like, or you can put your controls (like buttons and such) inside the existing pushpin, and in the click event make sure you set e.Handled = true;  Your button will get the event first and if you set the event to Handled then the event will not pass up to the pushpin's internal button.

I'm not sure what you mean about putting a UserControl on the map and be clickable.  How is that different than a pushpin?  You can just inherit from the pushpin class and modify the look and feel, and as long as you don't mess up the core behavior it will still work.