private void DigiTransitMapControl_MapElementPointerExited(MapControl sender, MapElementPointerExitedEventArgs args) { MapIcon icon = args.MapElement as MapIcon; if (icon == null) { return; } if ((MapIconState)icon.GetValue(MapIconStateProperty) == MapIconState.PointerOver) { // The MapIconChanged callback in the Attached Property handles Image changing on State changes. See MapElementExtensions.cs. icon.SetValue(MapIconStateProperty, MapIconState.None); } }