TemplateStudio
TemplateStudio copied to clipboard
TitleBarHelper still exists in 5.4
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:
- [X] WinUI
- [ ] WPF
- [ ] UWP
About your setup
- Visual Studio Version: 2022 Community
- Template Studio Wizard Version: 5.4
- Windows Build: Windows 10 Enterprise 19045.3208
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
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); //}
how to get the 5.5 adapted code then on a solution based on 5.4?