Refine WinUI shell and improve render diagnostics
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user