XAML-Map-Control/SampleApps/UniversalApp/App.xaml.cs

35 lines
823 B
C#
Raw Normal View History

2025-09-14 21:02:21 +02:00
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
2021-10-28 20:26:51 +02:00
namespace SampleApplication
{
2025-09-14 21:02:21 +02:00
public sealed partial class App : Application
{
public App()
{
2017-10-07 17:43:28 +02:00
InitializeComponent();
}
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
2025-09-14 21:02:21 +02:00
if (Window.Current.Content is not Frame rootFrame)
{
rootFrame = new Frame();
Window.Current.Content = rootFrame;
}
2025-09-14 21:02:21 +02:00
if (e.PrelaunchActivated == false)
{
2025-09-14 21:02:21 +02:00
if (rootFrame.Content == null)
{
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
2025-09-14 21:02:21 +02:00
Window.Current.Activate();
}
}
}
}