Is a XAML resource file (ResourceDictionary
) only loaded once into memory or does it have a negative memory and/or performance-effect if I include in all my UserControls and Windows a set of base resources contained in such resource-dictionaries?
views:
28answers:
1
+1
A:
It depends on where they are declared and how they are referenced. If you declare all your resource dictionaries in you app.xaml file, then they will only be referenced once. However, if you include them in each screen, the dictionaries will be duplicated in memory for each instance of each of those screens and can eat up memory pretty quickly.
Jeff Wain
2010-07-07 18:56:01