MapElement.MapStyleSheetEntryState MapElement.MapStyleSheetEntryState MapElement.MapStyleSheetEntryState MapElement.MapStyleSheetEntryState Property


Gets or sets the name of the state of this MapElement. If the style sheet defines a style for that state, that style is applied to this element. Values defined in the style sheet for the state override values defined in the MapStyleSheetEntry.

public : Platform::String MapStyleSheetEntryState { get; set; }
winrt::hstring MapStyleSheetEntryState();

void MapStyleSheetEntryState(winrt::hstring mapstylesheetentrystate);
public string MapStyleSheetEntryState { get; set; }
Public ReadWrite Property MapStyleSheetEntryState As string

Property Value

string string

The name of the state of this MapElement.

Additional features and requirements

Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)


string myStyleSheetJson = @"{""version"": ""1.*"",
        ""fillColor"":""#FF0000""}}}}"; = MapStyleSheet.ParseFromJson(myStyleSheetJson); MapIcon
  Location = new Geopoint(new BasicGeoposition { Latitude = 44, Longitude = -120 }),
  MapStyleSheetEntry = MapStyleSheetEntries.FoodPoint,
  MapStyleSheetEntryState = MapStyleSheetEntryStates.Selected,
}); MapIcon
  Location = new Geopoint(new BasicGeoposition { Latitude = 47, Longitude = -120 }),
  MapStyleSheetEntry = MapStyleSheetEntries.FoodPoint,
  MapStyleSheetEntryState = "myNamespace.myState",


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.