I have a custom WPF control that sometimes takes some time to render in some complex scenarios. I would like my user control to display a placeholder image (for example, "Please wait - rendering!"), And then actually display the control in standby mode (after processing the input).
I think that my user control has been modified to store the parent grid and two child elements: A) the placeholder image and B) the actual content. By default A) is visible, and when the visibility of user control changes I could have a BeginInvoke delegate, which, in turn, showed B) instead of A).
If there are many / several such control instances on the screen, they hopefully will not block the main thread while rendering all of them at the same time. Because delegates are queued with a priority lower than the input priority, the user interface should theoretically remain very responsive.
Has anyone encountered a similar problem?
source
share