The presentation code is the class that draws html using WebView 2 and its initialization process.
webView.EnsureCoreWebView2Async(null); processing is not done in
Form1() inside the comment section.
webView.EnsureCoreWebView2Async(null); is not run in the
form() function in the
InitializeAsync(); function, so I created the
Init() function and ran it, but it was not running.
I'm waiting for wait.
view.Render()Why is it possible that wait is the cause because it is performed when mixed with the drawing process in the function?
I tried to create a function based on reference site B, but it has not been executed.
Reference Site A: https://zenn.dev/vatscy/articles/ba2263bdfadfeb805379
Reference Site B: https://stackoverflow.com/questions/66550671/ensurecorewebview2async-not-ready-even-after-corewebview2initializationcompleted
async void Init(), but Radian wants to know why Xabe.FFmpeg does not encode video files
Let's not do async void other than event handler
Do you remember being advised that Also, I will answer Same answer
Form1_Load method is safe.
I would have suggested thatThese are meaningful things.for
Form1 constructors describe actions, but you have not yet seen the form while the constructor is running.You can see this by reading the caller
Form1 constructor completes, the
Application.Run() runs.UI processing (message loops) works in this context.
I have a question, why do I have to write wait in addition to the form_load function even though there is wait in the following functions?
The reason for this is also explained in Best Practices for Asynchronous Programming in Radian's response.For the time being, always use when calling the
async void must be avoided as a method definition to allow the caller to
© 2022 OneMinuteCode. All rights reserved.