I noticed a slight performance hiccup when playing video and decided to profile it with the Perforator and fixed the issue easily but came across a conspicuous region being drawn very rapidly 100% of the time. I am worried this dirty region could hinder performance.
Here is the region It's the gray box, the screenshot happened to catch it between rendering.
Now I found the culprit -- a busy indicator (from WPFToolkit) with its visibility set to Collapsed. No other collapsed controls are rendering like this, so I must assume it's due to the ProgressBar IsIndeterminate flag.
Two questions:
IsIndeterminate = true
? Animation in WPF produces dirty region even if it is collapsed or behind some elements. That's the known issue and could lead to performance degradation depending on elements count and animation resolution.
I recommend you to stop animation while your progress indicator in not visible. This should help.
Style
Trigger
which changed IsDeterminate when it was not visible. Seems like this could be pretty dangerous if left unchecked. Thanks - erodewald 2012-04-05 21:44