Hello,
Welcome to Microsoft Q&A!
When you opt-in to full title bar customization, you need to set the Window.ExtendsContentIntoTitleBar
property to true
in code instead, and then you could specify the drag region by calling the Window.SetTitleBar
method and passing in a UIElement that defines the drag region.
If you set ExtendsContentIntoTitleBar to true but do not call SetTitleBar, the system title bar is restricted to the caption buttons and a small area next to the caption buttons that is reserved for title bar behaviors. It is called Fallback Titlebar.
Before 1.4, we can't interact with elements in the title bar area except through keyboard input and focus. With 1.4 changes, WinUI 3 custom titlebar now uses appwindow titlebar + nonclientinputpointersource apis under the hood. This opens up new possibilities like allowing clickable interactive controls like textbox, button in the titlebar area, surrounded by draggable region on both left and the right sides.
For more details, I suggest you could refer to the links:
Clickable Interactive control sample for custom titlebar
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.