Background: I am displaying live images from a high speed digital camera at greater than 60Hz. Live image are displayed by updating Image control's ImageSource:
this.Dispatcher.Invoke(DispatcherPriority.Normal,(ThreadStart)delegate() { MyImage.Source = myNewBitMapImage; });
Problem: I wanted to improve app's performance by skipping any new images if a previous image haven't been shown on screen yet. For example, when Image control (MyImage) haven't finished updating last image yet, the above dispatcher call will be skipped till MyImage become "idle" again.
I have done something similar in MFC by using GetUpdateRect() to check whether there was still an region left to be updated, and if there were, the displaying of the new image is skipped.
Question: How to achieve same goal in WPF? Such that a new image is skipped if Image control haven't finished updating last image yet.
Thanks in advace.