Map​Element Map​Element Map​Element Class

Definition

Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

Prerelease. Represents an element displayed on a MapControl.

public : class MapElement : DependencyObject, IMapElement, IMapElement2public class MapElement : DependencyObject, IMapElement, IMapElement2Public Class MapElement Inherits DependencyObject Implements IMapElement, IMapElement2
Inheritance
MapElementMapElementMapElement
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited methods

Inherited properties

Remarks

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.

Constructors

MapElement() MapElement() MapElement()

Initializes a new instance of the MapElement class.

public : MapElement()public MapElement()Public Sub New()
Attributes

Properties

MapStyleSheetEntry MapStyleSheetEntry MapStyleSheetEntry

Prerelease. Gets or sets the name of a JavaScript Object Notation (JSON) entry in the map's style sheet. If the style sheet defines a style for that entry, that style is applied to this element.

public : PlatForm::String MapStyleSheetEntry { get; set; }public string MapStyleSheetEntry { get; set; }Public ReadWrite Property MapStyleSheetEntry As string
Value
PlatForm::String string string

The name of a JavaScript Object Notation (JSON) entry in the map's style sheet. If the style sheet defines a style for that entry, that style is applied to this element.

Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16225.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Set this property to a string or to any of the property values available in the MapStyleSheetEntries class.

To learn more about entries in a map style sheet, see Map style sheet reference.

MapStyleSheetEntryProperty MapStyleSheetEntryProperty MapStyleSheetEntryProperty

Prerelease. Identifies for the MapStyleSheetEntry dependency property.

public : static DependencyProperty MapStyleSheetEntryProperty { get; }public static DependencyProperty MapStyleSheetEntryProperty { get; }Public Static ReadOnly Property MapStyleSheetEntryProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

Identifier for the MapStyleSheetEntry dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16225.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

MapStyleSheetEntryState MapStyleSheetEntryState MapStyleSheetEntryState

Prerelease. Gets or sets the name of entry state of this MapElement. If the style sheet defines a style for that state, that style is applied to this element.

public : PlatForm::String MapStyleSheetEntryState { get; set; }public string MapStyleSheetEntryState { get; set; }Public ReadWrite Property MapStyleSheetEntryState As string
Value
PlatForm::String string string

The name of the entry state of this MapElement. If the style sheet defines a style for that state, that style is applied to this element.

Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16225.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Remarks

Set this property to a string or to any of the property values available in the MapStyleSheetEntryStates class.

To learn more about entries in a map style sheet, see Map style sheet reference.

MapStyleSheetEntryStateProperty MapStyleSheetEntryStateProperty MapStyleSheetEntryStateProperty

Prerelease. Identifies for the MapStyleSheetEntryState dependency property.

public : static DependencyProperty MapStyleSheetEntryStateProperty { get; }public static DependencyProperty MapStyleSheetEntryStateProperty { get; }Public Static ReadOnly Property MapStyleSheetEntryStateProperty As DependencyProperty
Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16225.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

MapTabIndex MapTabIndex MapTabIndex

Gets or sets a value that determines the order in which elements of the MapControl receive focus when the user navigates through those elements by pressing the Tab key.

public : int MapTabIndex { get; set; }public int MapTabIndex { get; set; }Public ReadWrite Property MapTabIndex As int
Value
int int int

A value that determines the order of logical navigation across elements in a MapControl.

Attributes

MapTabIndexProperty MapTabIndexProperty MapTabIndexProperty

Identifies the MapTabIndex dependency property.

public : static DependencyProperty MapTabIndexProperty { get; }public static DependencyProperty MapTabIndexProperty { get; }Public Static ReadOnly Property MapTabIndexProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the MapTabIndex dependency property.

Attributes

Tag Tag Tag

Prerelease. Gets or sets an arbitrary object value that can be used to store custom information about this object.

public : PlatForm::Object Tag { get; set; }public object Tag { get; set; }Public ReadWrite Property Tag As object
Value
PlatForm::Object object object

An arbitrary object value that can be used to store custom information about this object.

Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16225.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

TagProperty TagProperty TagProperty

Prerelease. Identifies the Tag dependency property.

public : static DependencyProperty TagProperty { get; }public static DependencyProperty TagProperty { get; }Public Static ReadOnly Property TagProperty As DependencyProperty
Attributes
Additional features and requirements
Device family
Windows 10 Insider Preview (introduced v10.0.16225.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Visible Visible Visible

Gets or sets a value that indicates whether the MapElement is visible on the MapControl.

public : PlatForm::Boolean Visible { get; set; }public bool Visible { get; set; }Public ReadWrite Property Visible As bool
Value
PlatForm::Boolean bool bool

true if the MapElement is visible on the MapControl; otherwise, false.

Attributes

VisibleProperty VisibleProperty VisibleProperty

Identifies the Visible dependency property.

public : static DependencyProperty VisibleProperty { get; }public static DependencyProperty VisibleProperty { get; }Public Static ReadOnly Property VisibleProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Visible dependency property.

Attributes

ZIndex ZIndex ZIndex

Gets or sets the z-index of the MapElement. A MapElement with a higher z-index is displayed on top of a MapElement with a lower z-index.

public : int ZIndex { get; set; }public int ZIndex { get; set; }Public ReadWrite Property ZIndex As int
Value
int int int

The z-index of the MapElement.

Attributes

ZIndexProperty ZIndexProperty ZIndexProperty

Identifies the ZIndex dependency property.

public : static DependencyProperty ZIndexProperty { get; }public static DependencyProperty ZIndexProperty { get; }Public Static ReadOnly Property ZIndexProperty As DependencyProperty
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the ZIndex dependency property.

Attributes

See Also