I have a WPF custom control that sometimes takes a while to render in some complex scenarios. I would like to be able to tell my custom control to show a placeholder image (e.g. "Please wait - rendering!") and then actually render the control in idle time (after input is processed).
I am thinking along the lines of having my custom control modified to hold a parent grid and two children: A) a placeholder image and B) the actual content. By default A) is visible and when visibility of the custom control changes I could BeginInvoke a delegate which would in turn show B) instead of A).
If there are many/several such control instances on the screen they would hopefully not block the main thread while rendering all of them simultaneously. Since delegates are queued with priority lower than input priority, UI should in theory remain very responsive.
Has anybody ever encountered a similar problem?