If I need a single event, I usually do the following:
// part of browser
UrlEventHandler docReadyDelegate = null;
var documentReady = new UrlEventHandler((sender, args) =>
{
view.DocumentReady -= docReadyDelegate; // unsubscribe
// some code here. Fired then browser document is ready!
});
docReadyDelegate = documentReady;
view.DocumentReady += docReadyDelegate; // subscribe
view.Navigate("http://google.com");
But I think that this is not optimal and not beautiful. I know that you can use Reactive Extensions to process the event once. How?
source
share