Refine WinUI shell and improve render diagnostics

This commit is contained in:
2026-08-11 16:27:18 +02:00
parent d62ae0b9fb
commit d744056583
11 changed files with 397 additions and 107 deletions
+5 -1
View File
@@ -1,4 +1,6 @@
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.
@@ -19,7 +21,9 @@ public sealed partial class MainWindow : Window
ExtendsContentIntoTitleBar = true;
SetTitleBar(AppTitleBar);
AppWindow.SetIcon("Assets/AppIcon.ico");
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));