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

RES$001

Synopsis:Do use StaticResource if you can, DynamicResource if you must
Language:XAML
Severity Level:1
Category:Resources


Description:

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.