Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Set AppWindow.Title to DisplayName #209

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Resizetizer/src/WindowIconGeneratorTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ public static void SetWindowIcon(this global::Microsoft.UI.Xaml.Window window)
// Lastly, retrieve the AppWindow for the current (XAML) WinUI 3 window.
global::Microsoft.UI.Windowing.AppWindow appWindow =
global::Microsoft.UI.Windowing.AppWindow.GetFromWindowId(windowId);
appWindow.SetIcon(""{iconName}.ico"");

if (appWindow != null)
{{
appWindow.SetIcon(""{iconName}.ico"");
appWindow.Title = AppInfo.Current.DisplayInfo.DisplayName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code doesn't work, from the top of my head, this looks like a Microsoft.Maui.Essentials call, so it will work just if we add a reference to that package, with I believe we don't want

}}
#endif
}}
}}
Expand Down
Loading