mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
Prevent window redraw when resizing as per http://stackoverflow.com/questions/2353381/prevent-window-redraw-when-resizing-c-sharp-windows-forms
This commit is contained in:
@@ -20,6 +20,10 @@ namespace CefSharp.WinForms.Example
|
||||
WindowState = FormWindowState.Maximized;
|
||||
|
||||
AddTab(CefExample.DefaultUrl);
|
||||
|
||||
//Only perform layout when control has completly finished resizing
|
||||
ResizeBegin += (s, e) => SuspendLayout();
|
||||
ResizeEnd += (s, e) => ResumeLayout(true);
|
||||
}
|
||||
|
||||
private void AddTab(string url, int? insertIndex = null)
|
||||
|
||||
@@ -34,6 +34,10 @@ namespace CefSharp.WinForms.Example.Minimal
|
||||
var bitness = Environment.Is64BitProcess ? "x64" : "x86";
|
||||
var version = String.Format("Chromium: {0}, CEF: {1}, CefSharp: {2}, Environment: {3}", Cef.ChromiumVersion, Cef.CefVersion, Cef.CefSharpVersion, bitness);
|
||||
DisplayOutput(version);
|
||||
|
||||
//Only perform layout when control has completly finished resizing
|
||||
ResizeBegin += (s, e) => SuspendLayout();
|
||||
ResizeEnd += (s, e) => ResumeLayout(true);
|
||||
}
|
||||
|
||||
private void OnBrowserConsoleMessage(object sender, ConsoleMessageEventArgs args)
|
||||
|
||||
Reference in New Issue
Block a user