Added Avalonia sample application

This commit is contained in:
ClemensFischer 2024-05-24 15:28:28 +02:00
parent dc8df5e486
commit 192ecbf4df
12 changed files with 364 additions and 12 deletions

View file

@ -114,6 +114,7 @@
<map:Map x:Name="map" ManipulationMode="All"
Center="53.5,8.2"
MinZoomLevel="2" MaxZoomLevel="21" ZoomLevel="11"
DoubleTapped="MapDoubleTapped"
PointerPressed="MapPointerPressed"
PointerReleased="MapPointerReleased"
PointerMoved="MapPointerMoved"

View file

@ -87,6 +87,11 @@ namespace SampleApplication
map.TargetHeading = 0d;
}
private void MapDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
map.TargetCenter = map.ViewToLocation(e.GetPosition(map));
}
private async void MapPointerPressed(object sender, PointerRoutedEventArgs e)
{
if (e.Pointer.PointerDeviceType == PointerDeviceType.Mouse)

View file

@ -36,14 +36,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240428000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" />
<Manifest Include="$(ApplicationManifest)" />
<ProjectReference Include="..\..\MapControl\WinUI\MapControl.WinUI.csproj" />
<ProjectReference Include="..\..\MapUiTools\WinUI\MapUiTools.WinUI.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\MapControl\WinUI\MapControl.WinUI.csproj" />
<ProjectReference Include="..\..\MapUiTools\WinUI\MapUiTools.WinUI.csproj" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240428000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
<!-- Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging