private void OnWebViewIsBrowserInitializedChanged(object sender, DependencyPropertyChangedEventArgs e) { if (chromium.IsBrowserInitialized) { if (pendingInitialization != null) { pendingInitialization(); pendingInitialization = null; } WebViewInitialized?.Invoke(); } else { Dispose(); } }
private void OnWebViewBrowserInitialized() { if (IsBrowserInitialized) { AsyncExecuteInUI(() => { lock (SyncRoot) { if (pendingInitialization != null) { pendingInitialization(); pendingInitialization = null; } } WebViewInitialized?.Invoke(); }); } else { Dispose(); } }