KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've made a list of everything that can helps to improve performance in a very complex application with a lot of controls. If you want to add yours, your welcome! If you know the size of the control, remove the Auto and enter the real value, so the parent doesn't have to parse all childs to check the size he needs Set the parameter IsHitTestVisible=False if the element doesn't need to be interactive Freeze all object that you can Use Static resources instead of Dynamic resources Don't use the Ellipse object, transform the Ellipse to a Path Don't use TextBox or Label if you can use a TextBlock Use Canvas instead of Grid when possible No FlowDocument Virtualize!! VirtualizingStackPanel instead of StackPanel Don't use List, the ObservableCollection is way faster Use the Drawing library, it's faster then the Shapes library Check your binding! If a binding doesn't works, it can be very slow Don't use Visibility.Hidden, use Visibility.Collapsed when you can DependencyProperty is 3x faster then INotifyPropertyChanged StreamGeometry is faster then PathGeometry Clear Event Handlers when you've done with them! Don't use the Object Opacity property, if you can, use his color opacity Check if your application is Hardware rendering (Tier-2) Reduce size/quality of your image when you can Rendering image is way faster then rendering vector! Tools that I use: WPF Inspector Snoop WPFPerf suite Visual Studio profiler CLR Profiler for .NET
Tags (comma-separated)
Save Edits
Cancel