XAML-Map-Control/SampleApps/WinUiApp/MainWindow.xaml

42 lines
1.6 KiB
Plaintext
Raw Normal View History

2021-07-01 22:07:46 +02:00
<Window
x:Class="WinUiApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:map="using:MapControl">
<Grid x:Name="root">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<map:Map x:Name="map" ZoomLevel="11" MaxZoomLevel="21" MouseWheelZoomDelta="1"
Center="{Binding MapCenter}"
MapLayer="{Binding MapLayers.CurrentMapLayer}">
<map:MapGraticule x:Name="graticule" Opacity="0.6"
Visibility="{Binding IsChecked, ElementName=graticuleCheckBox}"/>
</map:Map>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
<CheckBox x:Name="graticuleCheckBox"
VerticalAlignment="Center" Content="Graticule"/>
<CheckBox VerticalAlignment="Center" Content="Seamarks"
Checked="SeamarksChecked" Unchecked="SeamarksUnchecked"/>
<ComboBox Width="250" VerticalAlignment="Center" Margin="5"
ItemsSource="{Binding MapLayers.MapLayerNames}"
SelectedItem="{Binding MapLayers.CurrentMapLayerName, Mode=TwoWay}"/>
</StackPanel>
</Grid>
</Grid>
</Window>