Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Using 16.1.54, WPF. I've assigned event handlers to the WebViews Closing and Closed events in order to detect unexpected closures.
In some cases I want to deliberately close WebView. So in my code, I remove the handlers and call the Close method, as follows:
this.WebControl.WebView.Closing -= this.OnWebViewClosing; this.WebControl.WebView.Closed -= this.OnWebViewClosed; this.WebControl.WebView.Close(true);
After calling Close, I still see both handlers getting executed.
Additionally, the Closed event fires multiple times (at least 4, sometimes as many as 9) per WebView.
I would expect that: 1. If I remove my handlers then they should not fire 2. Closed should fire once per WebView
Please advise. Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, This most likely is because you have attached the handler multiple times. Please direct all further communications to this thread: http://www.essentialobjects.com/forum/postsm41303_WebView-API-Doc--Closing-Event.aspxThanks!
|