You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a winUi3 application which doesn't have title bar. i.e, Content will be extended to the title bar and Close, minimize, maximize buttons will be hidden. When the window is minimized in code behind, and when it is bought back to active, the bottom area of window is getting hidden behind task bar.
Similarly, when app is opened in full screen on first launch the taskbar is hidden. But when minimized and maximized again, it is getting hidden in behind.
Windows App SDK Version : 1.6.241114003
Windows.SDK.BuildTools : 10.0.26100.1742
Visual Studio version : 17.12.3
Steps to reproduce the bug
Create a blank packaged winui3 application.
In App.xaml.cs, OnLaunched method, add the below code after activating the window, AppWindow appWindow = GetAppWindowForCurrentWindow(); appWindow.SetPresenter(AppWindowPresenterKind.FullScreen); if (appWindow.Presenter is OverlappedPresenter p) { p.Maximize(); p.SetBorderAndTitleBar(false, false); appWindow.TitleBar.ExtendsContentIntoTitleBar = true; }
In MainWindow constructor, add the below code, this.SystemBackdrop = new DesktopAcrylicBackdrop(); this.SetTitleBar(null); this.AppWindow.TitleBar.IconShowOptions = IconShowOptions.HideIconAndSystemMenu; this.ExtendsContentIntoTitleBar = true; this.AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;
In myButton_Click method, add the below snippet to minimize the application. IntPtr hWnd = WindowNative.GetWindowHandle(this); WindowId myWndId = Win32Interop.GetWindowIdFromWindow(hWnd); AppWindow appWindow = AppWindow.GetFromWindowId(myWndId); appWindow.SetPresenter(AppWindowPresenterKind.Overlapped); if (appWindow.Presenter is OverlappedPresenter p) { p.Maximize(); p.Minimize(); p.SetBorderAndTitleBar(false, false); }
Start the app, after application started, minimize and then open the app from task bar
Expected behavior
The bottom part of the application should not hide behind the task bar.
Screenshots
Immediately after app launch,
After minimize and maximize.
NuGet package version
None
Windows version
Windows 11 Pro
22631.4602
Additional context
Note: This is working fine when the title bar and titlebar buttons are visible
The text was updated successfully, but these errors were encountered:
What you're describing seems to be the desired behaviour. Since you are invoking the window from task bar, it makes sense that the taskbar is on top. I don't think the window should re-size in this situation.
Describe the bug
Having a winUi3 application which doesn't have title bar. i.e, Content will be extended to the title bar and Close, minimize, maximize buttons will be hidden. When the window is minimized in code behind, and when it is bought back to active, the bottom area of window is getting hidden behind task bar.
Similarly, when app is opened in full screen on first launch the taskbar is hidden. But when minimized and maximized again, it is getting hidden in behind.
Windows App SDK Version : 1.6.241114003
Windows.SDK.BuildTools : 10.0.26100.1742
Visual Studio version : 17.12.3
Steps to reproduce the bug
AppWindow appWindow = GetAppWindowForCurrentWindow(); appWindow.SetPresenter(AppWindowPresenterKind.FullScreen); if (appWindow.Presenter is OverlappedPresenter p) { p.Maximize(); p.SetBorderAndTitleBar(false, false); appWindow.TitleBar.ExtendsContentIntoTitleBar = true; }
this.SystemBackdrop = new DesktopAcrylicBackdrop(); this.SetTitleBar(null); this.AppWindow.TitleBar.IconShowOptions = IconShowOptions.HideIconAndSystemMenu; this.ExtendsContentIntoTitleBar = true; this.AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;
IntPtr hWnd = WindowNative.GetWindowHandle(this); WindowId myWndId = Win32Interop.GetWindowIdFromWindow(hWnd); AppWindow appWindow = AppWindow.GetFromWindowId(myWndId); appWindow.SetPresenter(AppWindowPresenterKind.Overlapped); if (appWindow.Presenter is OverlappedPresenter p) { p.Maximize(); p.Minimize(); p.SetBorderAndTitleBar(false, false); }
Expected behavior
The bottom part of the application should not hide behind the task bar.
Screenshots
Immediately after app launch,
After minimize and maximize.
NuGet package version
None
Windows version
Windows 11 Pro
22631.4602
Additional context
Note: This is working fine when the title bar and titlebar buttons are visible
The text was updated successfully, but these errors were encountered: