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

AppWindowTitleBar.SetDragRectangles doesn't work in Windows App SDK 1.4.230822000 #8901

Closed
Starcloudsea opened this issue Sep 8, 2023 · 6 comments
Labels
area-AppWindow bug Something isn't working team-CompInput Issue for IXP (Composition, Input) team

Comments

@Starcloudsea
Copy link

Starcloudsea commented Sep 8, 2023

Describe the bug

After updating to Windows App SDK 1.4.230822000,
AppWindowTitleBar.SetDragRectangles(new RectInt32[]{new RectInt32(800, 0, ScreenWidth - 80, 40)});
It no longer has the effect of changing the title bar draggable area, and every time I use this method again, the Windows App SDK uses the default title bar draggable area instead of my customized title bar draggable area.
Hopefully Microsoft can fix this!

Steps to reproduce the bug

1, Install Windows App SDK 1.4.230822000 NuGet package for your "Blank Project (Packaged)".
2, use AppWindowTitleBar.SetDragRectangles(new RectInt32[]{new RectInt32(800, 0, 80, 40)}); to set the draggable area of the title bar.
3, run the app, move the mouse to the upper left corner of the app and double click.
4, you will see the app is maximized, which means this method is not working.
5, back to Windows App SDK 1.3.230724000, run the app again, move the mouse to the upper left corner of the app and double click.
6, you will see that the app is not maximized, which means this method worked.

Expected behavior

Run the app, mouse over the top left corner of the app, double click, the app is not maximized.

Screenshots

I don't know if there are any problems with these, but I'd like to try to provide them.
image
image

NuGet package version

Windows App SDK 1.4.0: 1.4.230822000

Packaging type

Packaged (MSIX)

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022-preview

Additional context

By the way, I'm not sure if anyone has mentioned this, and I'm not sure if Microsoft has a replacement method, because I've searched for it many times, and I haven't found any information about it at all, so if there is a replacement method, I hope you guys can let me know, thanks!

@Starcloudsea
Copy link
Author

Starcloudsea commented Sep 8, 2023

Sorry, I forgot about that.
image

@DarranRowe
Copy link

InputNonClientPointerSource.
The annoying thing here is that SetDragRects is marked as deprecated in the metadata and it does name InputNonClientPointerSource as the replacement.

@Starcloudsea
Copy link
Author

InputNonClientPointerSource. The annoying thing here is that SetDragRects is marked as deprecated in the metadata and it does name InputNonClientPointerSource as the replacement.

OK,Thanks.😉

@bpulliam bpulliam transferred this issue from microsoft/WindowsAppSDK Sep 21, 2023
@bpulliam bpulliam added area-AppWindow team-CompInput Issue for IXP (Composition, Input) team labels Sep 21, 2023
@steam3d
Copy link

steam3d commented Oct 4, 2023

@DarranRowe How it use? I also set AppWindowTitleBar.SetDragRectangles and it does nothing

@lhak
Copy link

lhak commented Oct 5, 2023

As stated in the release notes, you might have to call

AppWindow.TitleBar.IconShowOptions = IconShowOptions.HideIconAndSystemMenu

to disable the system menu when clicking at the upper left corner of the window.

@duncanmacmichael duncanmacmichael added the bug Something isn't working label Oct 23, 2023
@Starcloudsea
Copy link
Author

Hi, I almost forgot about this issue, I already got the answer from Microsoft Q&A a few months ago, but I forgot about this issue, sorry.

Here is the solution from Microsoft Q&A:
https://learn.microsoft.com/en-us/answers/questions/1362230/how-to-fix-appwindow-titlebar-setdragrectangles-no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-AppWindow bug Something isn't working team-CompInput Issue for IXP (Composition, Input) team
Projects
None yet
Development

No branches or pull requests

6 participants