/// <summary> /// Initializes a new instance of the <see cref="WebViewHost"/> class. /// </summary> protected WebViewHost() { DpiHelper.Initialize(); DpiHelper.SetPerMonitorDpiAwareness(); // Get system DPI DeviceDpi = DpiHelper.DeviceDpi; DpiChanged += OnDpiChanged; SizeChanged += OnSizeChanged; #if DEBUG_FOCUS GotFocus += (o, e) => { Debug.WriteLine($"GotFocus"); }; GotKeyboardFocus += (o, e) => { Debug.WriteLine("GotKeyboardFocus"); }; LostFocus += (o, e) => { Debug.WriteLine($"LostFocus"); }; LostKeyboardFocus += (o, e) => { Debug.WriteLine("LostKeyboardFocus"); }; KeyUp += (o, e) => { Debug.WriteLine($"KeyUp: Key: {e.Key}, SystemKey: {e.SystemKey}"); }; #endif }