mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
- moved tile rect calculation from MapBase to TileLayer - added TileLayer.ZoomLevelOffset property - Windows Universal sample application in solution MapControl VS2015
50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using System;
|
|
using Windows.ApplicationModel;
|
|
using Windows.ApplicationModel.Activation;
|
|
using Windows.UI.Xaml;
|
|
using Windows.UI.Xaml.Controls;
|
|
using Windows.UI.Xaml.Navigation;
|
|
|
|
namespace UniversalApp
|
|
{
|
|
sealed partial class App : Application
|
|
{
|
|
public App()
|
|
{
|
|
this.InitializeComponent();
|
|
this.Suspending += OnSuspending;
|
|
}
|
|
|
|
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
|
{
|
|
Frame rootFrame = Window.Current.Content as Frame;
|
|
|
|
if (rootFrame == null)
|
|
{
|
|
rootFrame = new Frame();
|
|
rootFrame.NavigationFailed += OnNavigationFailed;
|
|
|
|
Window.Current.Content = rootFrame;
|
|
}
|
|
|
|
if (rootFrame.Content == null)
|
|
{
|
|
rootFrame.Navigate(typeof(MainPage), e.Arguments);
|
|
}
|
|
|
|
Window.Current.Activate();
|
|
}
|
|
|
|
private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
|
|
{
|
|
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
|
|
}
|
|
|
|
private void OnSuspending(object sender, SuspendingEventArgs e)
|
|
{
|
|
var deferral = e.SuspendingOperation.GetDeferral();
|
|
deferral.Complete();
|
|
}
|
|
}
|
|
}
|