MapElement.MapStyleSheetEntryState 속성

정의

MapElement 상태의 이름을 가져오거나 설정합니다. 스타일시트가 해당 상태에 대한 스타일을 정의하는 경우 해당 스타일이 이 요소에 적용됩니다. 상태의 스타일시트에 정의된 값은 MapStyleSheetEntry에 정의된 값을 재정의합니다.

public:
 property Platform::String ^ MapStyleSheetEntryState { Platform::String ^ get(); void set(Platform::String ^ value); };
winrt::hstring MapStyleSheetEntryState();

void MapStyleSheetEntryState(winrt::hstring value);
public string MapStyleSheetEntryState { get; set; }
var string = mapElement.mapStyleSheetEntryState;
mapElement.mapStyleSheetEntryState = string;
Public Property MapStyleSheetEntryState As String

속성 값

String

Platform::String

winrt::hstring

MapElement 상태의 이름입니다.

Windows 요구 사항

디바이스 패밀리
Windows 10 Fall Creators Update (10.0.16299.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v5.0에서 도입되었습니다.)

예제

string myStyleSheetJson = @"{""version"": ""1.*"",
  ""extensions"":{
    ""myNamespace"":{
      ""myState"":{
        ""fillColor"":""#FF0000""}}}}";

this.map.StyleSheet = MapStyleSheet.ParseFromJson(myStyleSheetJson);
this.map.MapElements.Add(new MapIcon
{
  Location = new Geopoint(new BasicGeoposition { Latitude = 44, Longitude = -120 }),
  MapStyleSheetEntry = MapStyleSheetEntries.FoodPoint,
  MapStyleSheetEntryState = MapStyleSheetEntryStates.Selected,
});
this.map.MapElements.Add(new MapIcon
{
  Location = new Geopoint(new BasicGeoposition { Latitude = 47, Longitude = -120 }),
  MapStyleSheetEntry = MapStyleSheetEntries.FoodPoint,
  MapStyleSheetEntryState = "myNamespace.myState",
});

설명

이 속성을 문자열 또는 MapStyleSheetEntryStates 클래스에서 사용할 수 있는 속성 값으로 설정합니다.

지도 스타일시트 항목에 대한 자세한 내용은 지도 스타일시트 참조를 참조하세요.

적용 대상