示例#1
0
 private void OnMapElementPointerExited(MapControl sender, MapElementPointerExitedEventArgs args)
 {
     if (args.MapElement is MapIcon mapIcon && args.MapElement.Tag is Canteen c)
     {
         mapIcon.Image = GetImageForCanteen(c.Id);
     }
 }
示例#2
0
        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);
            }
        }
示例#3
0
 Point IMapElementPointerExitedEventArgsResolver.Position(MapElementPointerExitedEventArgs e) => e.Position;
示例#4
0
 Geopoint IMapElementPointerExitedEventArgsResolver.Location(MapElementPointerExitedEventArgs e) => e.Location;
示例#5
0
 MapElement IMapElementPointerExitedEventArgsResolver.MapElement(MapElementPointerExitedEventArgs e) => e.MapElement;
示例#6
0
 /// <summary>
 /// Gets the physical position on the <see cref="MapControl"/> where it received user input.
 /// </summary>
 /// <param name="e">The requested <see cref="MapElementPointerExitedEventArgs"/>.</param>
 /// <returns>
 /// The physical position on the <see cref="MapControl"/> where it received user input,
 /// in terms of X and Y coordinates.
 /// </returns>
 public static Point Position(this MapElementPointerExitedEventArgs e) => Resolver.Position(e);
示例#7
0
 /// <summary>
 /// Gets the map element that correspond to where the <see cref="MapControl"/> received user input.
 /// </summary>
 /// <param name="e">The requested <see cref="MapElementPointerExitedEventArgs"/>.</param>
 /// <returns>The map element that correspond to where the <see cref="MapControl"/> received user input.</returns>
 public static MapElement MapElement(this MapElementPointerExitedEventArgs e) => Resolver.MapElement(e);
示例#8
0
 /// <summary>
 /// Gets the geographic location that corresponds to where the <see cref="MapControl"/> received user input.
 /// </summary>
 /// <param name="e">The requested <see cref="MapElementPointerExitedEventArgs"/>.</param>
 /// <returns>The geographic location that corresponds to where the <see cref="MapControl"/> received user input.</returns>
 public static Geopoint Location(this MapElementPointerExitedEventArgs e) => Resolver.Location(e);
 private void MainMap_MapElementPointerExited(MapControl sender, MapElementPointerExitedEventArgs args)
 {
     AddIns.FirstOrDefault(addin => addin.MapElementsShown.Contains(args.MapElement))?.OnMapElementPointerExited(args.MapElement, args.Location.ToLatLon(), args.Position);
 }
 private void MainMap_MapElementPointerExited(MapControl sender, MapElementPointerExitedEventArgs args)
 {
     AddIns.FirstOrDefault(addin => addin.MapElementsShown.Contains(args.MapElement))?.OnMapElementPointerExited(args.MapElement, args.Location.ToLatLon(), args.Position);
 }