Uses for XAML Resources in Silverlight

• Create nonvisual objects: This is useful if other elements use these objects. For example, you could create a data object as a resource and then use data binding to display its information in several elements.
• Reuse objects: Once you define a resource, several elements can draw on it. For example, you can define a single brush that’s used to color in several shapes.
• Centralize details: It’s easier to pull frequently changed information into one place (a resources section) rather than scatter it through a complex markup file, where it’s more difficult to track down and change.

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.