I'm using the CefSharp browser to grab images off of an Html page and convert them to System.Drawing.Bitmaps. To do so, I've implemented a BrowserRequestHandler and ImageResourceRequestHandler. The ImageResourceRequestHandler.OnResourceLoadComplete() publishes an event which pushes the web page images to my Winforms app. This works very well, but I'm missing 2 pieces of information about the images.
First, the Winforms app doesn't know when it has received the all the images for the page. LoadingStateChanged.IsLoading transitions to false well before all images have been pushed. Is there any way to know when the last image resource has been pushed?
Second, the Winforms app gets the images in a random order. I'd like to know what their position is in document order (e.g. 'image 3, image 4, image 1 ...', regardless of the order in which they are received). Is there any way to fetch this info?