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

34 lines
729 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;
2026-04-13 17:14:49 +02:00
namespace SampleApplication;
public sealed partial class App : Application
{
2026-04-13 17:14:49 +02:00
public App()
{
2026-04-13 17:14:49 +02:00
InitializeComponent();
}
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
if (Window.Current.Content is not Frame rootFrame)
{
2026-04-13 17:14:49 +02:00
rootFrame = new Frame();
Window.Current.Content = rootFrame;
}
2026-04-13 17:14:49 +02:00
if (e.PrelaunchActivated == false)
{
2026-04-13 17:14:49 +02:00
if (rootFrame.Content == null)
{
2026-04-13 17:14:49 +02:00
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
2026-04-13 17:14:49 +02:00
Window.Current.Activate();
}
}
}