PlaceInfo 클래스

정의

사용자가 창 바깥쪽을 클릭할 때 자동으로 닫히게 되는 밝은 해제 가능한 창에서 해당 위치를 설명하는 지도 위치 및 정보를 표시합니다.

public ref class PlaceInfo sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class PlaceInfo final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class PlaceInfo
Public NotInheritable Class PlaceInfo
상속
Object Platform::Object IInspectable PlaceInfo
특성

Windows 요구 사항

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

예제

이 예제에서는 사용자가 해당 위치를 보기 위해 클릭하는 단추 아래에 있는 시애틀 스페이스 니들의 위치를 보여 줍니다.

private void SpaceNeedle_Click(object sender, RoutedEventArgs e)
{
    Geopoint spaceNeedlePoint = new Geopoint
        (new BasicGeoposition { Latitude = 47.6205, Longitude = -122.3493 });

    PlaceInfoCreateOptions options = new PlaceInfoCreateOptions();

    options.DisplayAddress = "400 Broad St, Seattle, WA 98109";
    options.DisplayName = "Seattle Space Needle";

    PlaceInfo spaceNeedlePlace =  PlaceInfo.Create(spaceNeedlePoint, options);

    FrameworkElement targetElement = (FrameworkElement)sender;

    GeneralTransform generalTransform =
        targetElement.TransformToVisual((FrameworkElement)targetElement.Parent);

    Rect rectangle = generalTransform.TransformBounds(new Rect(new Point
        (targetElement.Margin.Left, targetElement.Margin.Top), targetElement.RenderSize));

    spaceNeedlePlace.Show(rectangle, Windows.UI.Popups.Placement.Below);
}

설명

버전 기록

Windows 버전 SDK 버전 추가된 값
1803 17134 CreateFromAddress(String)
1803 17134 CreateFromAddress(String,String)

속성

DisplayAddress

PlaceInfo와 연결된 주소를 가져옵니다.

DisplayName

PlaceInfo와 연결된 표시 이름을 가져옵니다.

Geoshape

PlaceInfo와 연결된 지리적 셰이프를 가져옵니다.

Identifier

PlaceInfo와 연결된 식별자를 가져옵니다.

IsShowSupported

앱이 현재 컨텍스트에 따라 지도 위치 및 관련 정보를 포함하는 밝은 해제 가능 창을 표시할 수 있는지 여부를 나타내는 값을 가져옵니다.

메서드

Create(Geopoint)

PlaceInfo instance 만듭니다.

Create(Geopoint, PlaceInfoCreateOptions)

PlaceInfo instance 만듭니다.

CreateFromAddress(String)

주소를 사용하여 PlaceInfo instance 만듭니다.

CreateFromAddress(String, String)

주소와 표시 이름을 사용하여 PlaceInfo instance 만듭니다.

CreateFromIdentifier(String)

PlaceInfo instance 만듭니다.

CreateFromIdentifier(String, Geopoint, PlaceInfoCreateOptions)

PlaceInfo instance 만듭니다.

CreateFromMapLocation(MapLocation)

PlaceInfo instance 만듭니다.

Show(Rect)

팝업 창, 지도 위치 및 PlaceInfo에 설명된 관련 정보를 표시합니다.

Show(Rect, Placement)

가볍게 해제할 수 있는 창, 지도 위치 및 PlaceInfo에 설명된 관련 정보를 표시합니다.

적용 대상