我有这个文本块:
<TextBlock x:Name="Coordinates" Text="Some Coordinates"/>
如何从代码隐藏中访问此对象?我试图用“文本”的内容替换Locaton()中的硬编码坐标:
private void DestinationButton_Click(object sender, RoutedEventArgs e)
{
Location loc= new Location (20.2127297,-87.4625591);
myMap.Center = loc;
myMap.ZoomLevel = 8;
}