PDA

View Full Version : SelectionChange Event



calv1ns
10-12-2006, 11:49 AM
With the SelectionChange Event:

object.SelectionChange(NewSelection, OldSelection)

NewSelection ByVal Object. The newly selected Direction, Location, Pushpin, Shape, or Waypoint object on the map.

Does anyone know of a easy yet fool proof way to determine which one of Direction, Location, Pushpin, Shape, or Waypoint object the NewSelection object is?

Most of these have a Type property but the type values are not unique between Objects.

Ciao,

Wilfried
10-12-2006, 12:55 PM
Hi,


if (NewSelection is Location)
// it is a Location object

or


Location loc = NewSelection as Location;
if (loc != null)
// it is a Location object

In VB something similar.