MapIcon.Image Property

Definition

Gets or sets the image for the MapIcon. Provide an optional custom image to replace the default point of interest (POI) image. The following stream formats are supported:

  • PNG - a compressed PNG formatted stream
  • JPG - a compressed JPG formatted stream
  • SVG - a compressed SVG formatted stream
  • BMP - an uncompressed BMP format stream
  • Raw RGB bytes. The size of the image is assumed to be square. This is only valid for a stream with an integral square root length.
public:
 property IRandomAccessStreamReference ^ Image { IRandomAccessStreamReference ^ get(); void set(IRandomAccessStreamReference ^ value); };
IRandomAccessStreamReference Image();

void Image(IRandomAccessStreamReference value);
public IRandomAccessStreamReference Image { get; set; }
var iRandomAccessStreamReference = mapIcon.image;
mapIcon.image = iRandomAccessStreamReference;
Public Property Image As IRandomAccessStreamReference

Property Value

The point of interest (POI) image for the MapIcon.

Remarks

The following line of code displays the MapIcon with a custom image saved in the Assets folder of the project.

MapIcon1.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/customicon.png"));

Applies to

See also