XAML-Map-Control/SampleApps/UniversalApp/App.xaml.cs
2026-04-13 17:14:49 +02:00

33 lines
729 B
C#

using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace SampleApplication;
public sealed partial class App : Application
{
public App()
{
InitializeComponent();
}
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
if (Window.Current.Content is not Frame rootFrame)
{
rootFrame = new Frame();
Window.Current.Content = rootFrame;
}
if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
Window.Current.Activate();
}
}
}