Skip to content

Commit 79f2503

Browse files
committed
WinForms Example - Set BrowserTabUserControl Bounds on creation to create browser at final size
Previously the ChromiumWebBrowser instance was created smaller and resized to fill, this would show a black region that's resized. Set the initial Bounds to improve the sizing
1 parent 8e58174 commit 79f2503

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CefSharp.WinForms.Example/BrowserForm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ private void AddTab(string url, int? insertIndex = null)
8989
var browser = new BrowserTabUserControl(AddTab, url, multiThreadedMessageLoopEnabled)
9090
{
9191
Dock = DockStyle.Fill,
92+
Bounds = browserTabControl.Bounds
9293
};
9394

9495
var tabPage = new TabPage(url)

0 commit comments

Comments
 (0)