-
Notifications
You must be signed in to change notification settings - Fork 697
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
Any element created on the titlebar is considered as a titlebar! #9448
Comments
AFAIK, this is expected behaviour. So the real bug here isn't that anything on the title bar is considered the title bar, but instead, WinUI 3 placed content at the top of the window without checking if there was a custom title bar. It can't just check if it is within the bounds of the client area, since the custom title bar is seen as part of the window's client area. |
This is an expected behavior. This is how titlebar apis work. They create a draggable region wherever you define and that acts like a titlebar region. You can infact have multiple. Coming back to your problem, since you are already using low level non client apis, you can just disable them (using ClearRegionRect api) whenever NavigationView is open and setRegionRects when it is closed. In future, there can be better ways to solve it. For now, this is the best way. Since, it is by design, I am closing the bug. Feel free to comment if you have more related questions on it. |
Describe the bug
When I collapse the NavigationView, I then select one of the items (which includes the submenu).
An item that is placed on the title bar is considered as a title bar, and places that can be dragged are dragged, and places that can be clicked are clicked.
this is how i define titlebar:
and
full code available here:
https://github.com/WinUICommunity/WinUICommunity/tree/main/dev/Components/Controls/Ported/TitleBar
@pratikone Can you explain why this happens?
Is there a problem with my codes? Or is this a bug?
Steps to reproduce the bug
1.Create a titlebar
2.Create some element on titlebar (NavigationView + submenu)
3.try to click on first item
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.5.1: 1.5.240311000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: