Open oetjen opened 2 weeks ago
I also see wpf ChromiumWebBrowser resizing issues in my demo app for Baksteen.Blazor.CefSharp, .net 8.0. When enlarging the window the webview seems to automatically resize up to a certain size, but then it stops, and it will only suddenly resize when I start hovering the mouse over elements in the webview. I've tested this issue occurs both in 128.4.90 and 129.0.110.
Screenrecording: https://github.com/user-attachments/assets/ad6ec647-095e-48ff-badf-ee96e41cf2e7
There's been some major upstream changes recently. See https://github.com/cefsharp/CefSharp/issues/4795 for more details.
There's a pretty high change this is an upsteram
issue. There's only been minor changes to the WPF
implementation over the last few versions.
Make sure you have an app.manifest
with Win 10 compatibility set
so GPU detection works correctly.
Resize Problem in WPF Grid since 127.3.50
Using version 127.3.50
can you please try setting the following option, in your App.xaml.cs
is ane asy place.
c#
var settings = new CefSettings();
settings .ChromeRuntime = false;
settings.CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "MyCefSharpApp\\Cache")
var initialized = Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
Create a WPF Window with a Grid, add several ChromiumWebBrowsers into each grid.
Is a grid actually relevant? Or is it just multiple browsers displayed at the same time?
When enlarging the window the webview seems to automatically resize up to a certain size, but then it stops, and it will only suddenly resize when I start hovering the mouse over elements in the webview. I've tested this issue occurs both in 128.4.90 and 129.0.110.
Based on this I don't think multiple browsers has anything to do with the issue.
Is there an existing issue for this?
CefSharp Version
129.0.110
Operating System
Windows 11
Architecture
x64
.Net Version
.NET Framework 4.8
Implementation
WPF
Reproduction Steps
Create a WPF Window with a Grid, add several ChromiumWebBrowsers into each grid. Load some simple HTML content into each browser. Start App and resize the window -> WebBrowser is not resized according to the window / grid size changes -> When using the mouse scroll wheel, the browser size is updated correctly. This behaviour is observed first in 127.3.50. In 126.2.180.0, everything was ok
The following project contains some sample code, as well as a video: See: https://github.com/oetjen/ChromiumResizeProblem
Expected behavior
As in 126.2.180.0 -> Browser windows should resize
Actual behavior
Browser windows do not resize
Regression?
Worked in 126.2.180.0
Known Workarounds
none
Does this problem also occur in the CEF Sample Application
No
Other information
No response