microsoft / TemplateStudio

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
Other
2.65k stars 459 forks source link

TitleBarHelper still exists in 5.4 #4706

Open akshaybabloo opened 10 months ago

akshaybabloo commented 10 months ago

Describe the bug

According to #4516 the helper should have been removed in 5.3 but I still see TitleBarHelper.cs file being created and used. Is this supposed to be still useful?

To Reproduce

Create a blank project

Additional context

No response

Applies to the following platforms:

About your setup

Mysterious-Dev commented 7 months ago

Yeah, it is ^^. For the 5.5 update (soon as I write this message ), it remains for the adaptation of the TitleBar with the new system introduced with the Windows App SDK 1.4.

https://github.com/microsoft/TemplateStudio/commit/52d63a4538c676bf97e0486a0df5d44b2cd4841a

JoySurfer commented 7 months ago

It seems that these function calls in TitleBarHelper are no longer necessary.

//var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(App.MainWindow); //if (hwnd == GetActiveWindow()) //{ // SendMessage(hwnd, WMACTIVATE, WAINACTIVE, IntPtr.Zero); // SendMessage(hwnd, WMACTIVATE, WAACTIVE, IntPtr.Zero); //} //else //{ // SendMessage(hwnd, WMACTIVATE, WAACTIVE, IntPtr.Zero); // SendMessage(hwnd, WMACTIVATE, WAINACTIVE, IntPtr.Zero); //}

smadep commented 7 months ago

how to get the 5.5 adapted code then on a solution based on 5.4?