MapControl.MapElements MapControl.MapElements MapControl.MapElements MapControl.MapElements Property

Definition

Gets the collection of MapElement objects that are children of the MapControl.

public : IVector<MapElement> MapElements { get; }
IVector<MapElement> MapElements();
public IList<MapElement> MapElements { get; }
Public ReadOnly Property MapElements As IList<MapElement>

Property Value

IList<MapElement> IList<MapElement>

The collection of MapElement objects that are children of the MapControl.

Remarks

Note

In the Windows 10 Fall Creators Update, we recommend that you add MapElement objects to a MapElementsLayer instead of adding them to the MapElements collection.

Display pushpins, images, and shapes on the MapControl by adding them to its MapElements collection.

  • Display an image such as a pushpin with optional text by using the MapIcon class. Keep the default image or provide a custom image.
  • Define and display a MapPolygon or a MapPolyline. Alternately, to display XAML elements on the MapControl, add them to its Children collection.

For more info, see Display maps with 2D, 3D, and Streetside views.

See also