TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
XAML Coding Standard


Synopsis:Do use StaticResource if you can, DynamicResource if you must
Severity Level:1


In XAML, resources can be referred to either statically or dynamically. There are benefits to using static resources, such as better performance and better compile-time checks. It is not always possible to use a static resource, though. In general, the compiler must be able to resolve a reference to a static resource at compile-time. If this is not possible, you should use a dynamic resource instead. If you need skinning or theming, you will also need dynamic resources, because a resource may have a different definition for different themes.