microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.36k stars 678 forks source link

A white space when disable border and titlebar of window #9621

Open tranhuynhthaitrung opened 2 years ago

tranhuynhthaitrung commented 2 years ago

Describe the bug

When we create a window and call function: SetBorderAndTitleBar(false, false); We see that window still have a white space

Steps to reproduce the bug

  1. Create window, get Presenter and call function: SetBorderAndTitleBar(false, false)
  2. Show window, We see that window still have a white space at top

Expected behavior

No response

Screenshots

image

image

NuGet package version

WinUI 3 - Windows App SDK 1.1.4

Windows app type

Device form factor

Desktop

Windows version

Windows 11 (21H2): Build 22000

Additional context

No response

castorix commented 2 years ago

This is similar to #2772

tranhuynhthaitrung commented 2 years ago

@castorix thank you~

tranhuynhthaitrung commented 2 years ago

@castorix when I try to apply ~ WS_THICKFRAME

UI is Ok, but my WindowProc cant receive any more message :(

castorix commented 2 years ago

@castorix when I try to apply ~ WS_THICKFRAME

UI is Ok, but my WindowProc cant receive any more message :(

I don't see what you mean. Removing WS_THICKFRAME removes sizing borders. Then I can add a Border to use Pointer events to move the window :

WinUI3_NoCaption

tranhuynhthaitrung commented 2 years ago

@castorix I mean that after remove WS_THICKFRAME, I can't receive WM_NCHITTEST

I see that winui create a child window, may be this child window covered whole hwnd which be register wndproc?

Do you have any suggestion?

1663659913

castorix commented 2 years ago

Microsoft.UI.Content.ContentWindowSiteBridge class is the Composition window which draws XAML But what do you want to do with WM_NCHITTEST ?

TrungTHT commented 2 years ago

@castorix I want to use it to custom titlebar, because ExtentContentTitleBar can not hide some caption buttons. I just see that next version can resolve it 😁

Hope that we can get new version early

github-actions[bot] commented 6 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.