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

[Problem/Bug]: I Can't Resize Window with Full-Window WebView2, WPF and WindowChrome #4538

Closed
EarzuChan opened this issue May 6, 2024 · 3 comments
Assignees
Labels
feature request feature request tracked We are tracking this work internally.

Comments

@EarzuChan
Copy link

EarzuChan commented May 6, 2024

What happened?

I’m using WPF and WindowChrome to achieve a window without Title Bar and with the sleek rounded window border on Windows 11. My goal is to have a full-window WebView2 control that renders my user interface using HTML5, while maintaining the Windows 11 window borders.

However, I’ve encountered an issue: When the WebView2 control occupies the entire window, I’m unable to resize the window by dragging its borders (the cursor doesn’t change to the resize arrow, and the borders are not draggable). Interestingly, if I set a certain Margin for the WebView2 control, the white space left by the margin allows the cursor to change to the resize arrow, and I can resize the window by dragging the borders.

My desired outcome is to have a full-window WebView2 that renders my UI using HTML5, with the attractive rounded window border on Windows 11, without leaving any whitespace to the window border (similar to Electron).

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

124.0.2478.80

SDK Version

1.0.2478.35

Framework

WPF

Operating System

Windows 11

OS Version

22635.3566

Repro steps

My WPF Window Code:

Content = new WebView2() /*{ Margin = new Thickness(8) }* that leave a whitespace to resize window*/;

WindowChrome.SetWindowChrome(this, new WindowChrome()
{
    CaptionHeight = 0, // No title bar
});

If I don't give the WebView2 control a Margin, the Window Border can not be dragged, and I suspect that the WebView2 control *somehow * obscures the system's border drag :(

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

No, this never worked

Last working version (if regression)

No response

AB#50632947

@EarzuChan EarzuChan added the bug Something isn't working label May 6, 2024
@tochukwuIbeEkeocha tochukwuIbeEkeocha added feature request feature request tracked We are tracking this work internally. and removed bug Something isn't working labels May 7, 2024
@tochukwuIbeEkeocha
Copy link
Contributor

Hey @EarzuChan, thanks for opening this issue. Looks like this is not a bug but a feature request, we will add it to our backlog. Cheers!

@EarzuChan
Copy link
Author

Hey @EarzuChan, thanks for opening this issue. Looks like this is not a bug but a feature request, we will add it to our backlog. Cheers!

Well. Thank you all. Hope to hear something from you soon

@champnic
Copy link
Member

Thanks for the feature request @EarzuChan! We are tracking this as part of #2243.

@champnic champnic closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants