WPF Performance Tip
If you have a lot of controls displaying, layout passes can cause performance issues. One way to avoid layout passes is to hide rather than collapse elements in converters or triggers. Collapsing an element will cause layout passes while hiding an element will preserve all spacing avoiding the need for a layout pass.
Similarly, frequently changing height and width can be slow in a window with a lot of controls.
If you’re looking to shave off a few hundred extra milliseconds these are worth trying.
No comments yet.