Is your code running as fast as possible, but your WPF GUI is build up pretty slow? Well here are some tips which might help you find the problem:
- Check for broken bindings
If you leave broken bindings in your XAML it will hamper down the performance of building up the GUI significantly. You can for instance follow the tips in this excellent thread on Stackoverflow on how to do that: http://stackoverflow.com/questions/337023/how-to-detect-broken-wpf-data-binding
- Provide fallback values
Next to fixing broken bindings, providing fallback values when properties are null can increase performance a tiny bit. The exceptions are still thrown, but handled better. More information can be found here: http://stackoverflow.com/questions/20629915/binding-fails-silently-for-nested-property. Be carefull not to ignore broken bindings though, because that is worse than not providing fallback values, as pointed out here in the answer by Rob: http://stackoverflow.com/questions/5390198/should-i-always-use-bindingbase-fallbackvalue
As I was writing this blogpost I stumbled upon another blog with lots of great tips. Make sure to check them out at: http://www.wpftutorial.net/10PerformanceTips.html
If you are not sure about any of the tips provided by me or the wpf tutorial blog feel free to contact me and maybe I can help.