drag and drop WebView2 into a panel in winform as webView
here is my code
{if (webView.CoreWebView2 == null) webviewInit();
webView.CoreWebView2.NavigateToString("https://finance.yahoo.com/quote/" + symbolTbx.Text); // this gets uninitialized exception during runtime.
...
async void webViewInit()
webView.Source = new Uri(" https://finance.yahoo.com/quote/");
string userDataFolder = null;
CoreWebView2EnvironmentOptions options = null;
CoreWebView2Environment env = CoreWebView2Environment.CreateAsync("", userDataFolder, options).GetAwaiter().GetResult();
await webView.EnsureCoreWebView2Async(env);
}
what should I do?