2017-01-07 1 views
0

나는이 같은지도에 foreach 루프와 압정을 추가하고 :빙지도에 여러 줄의 텍스트를 표시하는 방법은 무엇입니까?

내 클래스는 다음과 같습니다
Pushpin p = new Pushpin() { Location = new Microsoft.Maps.MapControl.WPF.Location { Latitude = n.latitude, Longitude = n.longtitude} }; 

: 나는 그것을, 그래서 압정에 주소 클래스에서 다른 데이터를 추가하려면 어떻게

public class Address 
{ 
    public int ID { get; set; } 
    public string companyName { get; set; } 
    public string address { get; set; } 
    public string street { get; set; } 
    public string houseNumber { get; set; } 
    public double longtitude { get; set; } 
    public double latitude { get; set; } 
} 

을 이런 식으로 보일까요? Pushpin

+1

압정은 ContentControl이므로 적절한 ContentTemplate을 설정할 수 있습니다. – Clemens

답변

0

당신이 링크 한 이미지는 infobox입니다. 내가 권장하는 방법은 사용자 정의 UIControl을 작성하여 원하는대로 표시 한 다음 Pushpin 클래스를 해킹하지 않고 맵에 추가하는 것입니다. 다음 코드 예제는 다음과 같습니다

https://msdn.microsoft.com/en-us/library/hh868032.aspx

시작하고 텍스트 필드를 추가 할 배경색으로 그리드를 사용해보십시오.