基本上,我的问题已经出现在标题中:当我有如下 MainWindow 时:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:easycache"
xmlns:map="clr-namespace:MapControl;assembly=MapControl.WPF"
x:Class="easycache.MainWindow"
x:Name="MainWindow1"
Title="easycache"
Height="600"
Width="850">
<map:Map Grid.Column="2"
Grid.Row="1"
Name="map"
IsManipulationEnabled="True"
LightForeground="Black"
LightBackground="White"
DarkForeground="White"
DarkBackground="#FF3F3F3F"
Center="0.0,0.0"
ZoomLevel="0.0"
TileLayer="{Binding Source={StaticResource TileLayersView}, Path=CurrentItem}" />
在我的窗口 2 中,我有:
<map:Map Name="map" IsManipulationEnabled="False"
LightForeground="Black" LightBackground="White" DarkForeground="White" DarkBackground="#FF3F3F3F"
Center="0.0,0.0" ZoomLevel="{Binding ?????}">
我想将 Window2 中地图的 ZoomLevel 绑定到我的 MainWindow 中地图的 ZoomLevel。我怎样才能做到这一点?
问候, 亚洛金