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

Bottom area of window is getting hidden behind task bar when maximizing the Window Provided Title bar and buttons are hidden. #10244

Closed
AkilanRagavaswamy opened this issue Dec 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@AkilanRagavaswamy
Copy link

AkilanRagavaswamy commented Dec 18, 2024

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

  1. Create a blank packaged winui3 application.
  2. 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; }
  3. 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;
  4. 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); }
  5. 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,
Image

After minimize and maximize.
Image

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

@AkilanRagavaswamy AkilanRagavaswamy added the bug Something isn't working label Dec 18, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Dec 18, 2024
@karkarl
Copy link
Contributor

karkarl commented Dec 19, 2024

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.

Closing, marking as by design.

@karkarl karkarl closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage Issue needs to be triaged by the area owners label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants