using Microsoft.UI.Xaml; using System; using System.IO; // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. namespace AmiReel_WinUI; /// /// The application window. This hosts a Frame that displays pages. Add your /// UI and logic to MainPage.xaml / MainPage.xaml.cs instead of here so you /// can use Page features such as navigation events and the Loaded lifecycle. /// public sealed partial class MainWindow : Window { public MainWindow() { InitializeComponent(); ExtendsContentIntoTitleBar = true; SetTitleBar(AppTitleBar); string? executablePath = Environment.ProcessPath; if (!string.IsNullOrWhiteSpace(executablePath) && File.Exists(executablePath)) AppWindow.SetIcon(executablePath); // Navigate the root frame to the main page on startup. RootFrame.Navigate(typeof(MainPage)); } }