WPF is very dynamic and allows us to use resources in many different ways. We can use Static or Dynamic. We can place all our resources in App.xaml or use merged dictionaries each time.
You can see all the approaches and what I think is best practice in my WPF Merged Dictionary problems and solutions post.
If you’re new to WPF resources, I suggest reading my Explicit, Implicit and Default styles in WPF post before diving into this one.
This benchmark is supposed to show, in numbers, how any approach affects performance.
Here’s what I want answered with this benchmark:
- Is splitting resources in App.xaml to many Merged Dictionaries file vs. one long App.xaml file means longer application startup time?
- Is loading all resources in App.xaml once better than loading the resources every time with merged dictionary?
- Is DynamicResource instead of StaticResource an issue? How big of an issue?’