Webview.dispose(); resolves this issue.
Closable tab header not working
I am trying to embed Webform to WinForms using webview2 in a tabbed design.
When I click a button in page 1, its content loads in page 2 .
Then I tried to close that page2 using the tabheader close button X.
It closes the page2 , but if I again execute the button click on page 1 it is not working
Seems something still in a disposable state , and when I am again execute button click, it may think like its already opened and so it is not opening the content in new tabpage.
private void OnCloseButtonClicked(object sender, RoutedEventArgs e)
{
Call the function to remove /dispose the tabpage
}
}
Could you please help to find out this issue?
Thanks In Advance!
2 answers
Sort by: Most helpful
-
-
Jiale Xue - MSFT 48,866 Reputation points Microsoft Vendor
2025-01-20T07:59:01.78+00:00 Hi @Neha, Welcome to Microsoft Q&A,
Because Q&A cannot mark your own answer, in order to allow more people to search for related problems that have been solved.
I have reposted your answer, you can mark it to help more people.
The solution to resolves this issue is " Webview.dispose();".
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.