mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-04 22:18:56 +00:00
Added Heading Reset Button to sample applications
This commit is contained in:
parent
e3167b3e2c
commit
f478bf5c3b
8 changed files with 107 additions and 19 deletions
|
|
@ -1,9 +1,8 @@
|
|||
<Window
|
||||
x:Class="SampleApplication.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:map="using:MapControl"
|
||||
xmlns:local="using:SampleApplication">
|
||||
<Window x:Class="SampleApplication.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:map="using:MapControl"
|
||||
xmlns:local="using:SampleApplication">
|
||||
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
|
|
@ -85,8 +84,8 @@
|
|||
<local:MapViewModel/>
|
||||
</Grid.DataContext>
|
||||
|
||||
<map:Map x:Name="map"
|
||||
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11" MouseWheelZoomDelta="1"
|
||||
<map:Map x:Name="map" ManipulationMode="All"
|
||||
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11"
|
||||
MapLayer="{Binding MapLayers[OpenStreetMap]}"
|
||||
PointerMoved="MapPointerMoved"
|
||||
PointerExited="MapPointerExited">
|
||||
|
|
@ -132,6 +131,17 @@
|
|||
Minimum="{Binding MinZoomLevel, ElementName=map}"
|
||||
Maximum="{Binding MaxZoomLevel, ElementName=map}"
|
||||
Value="{Binding TargetZoomLevel, ElementName=map, Mode=TwoWay}"/>
|
||||
|
||||
<Button Margin="2" Padding="8" ToolTipService.ToolTip="Reset Heading" Click="ResetHeadingButtonClick">
|
||||
<Button.Visibility>
|
||||
<Binding Path="Heading" ElementName="map">
|
||||
<Binding.Converter>
|
||||
<local:HeadingToVisibilityConverter/>
|
||||
</Binding.Converter>
|
||||
</Binding>
|
||||
</Button.Visibility>
|
||||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph=""/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<Border HorizontalAlignment="Center" VerticalAlignment="Top" Margin="4"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue