Silverlight includes a resource system that integrates closely with XAML. Using resources, you can do the following:
- 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. Later in this book, you'll use resources to define styles and templates that are reused among elements.
- Centralize details: Sometimes, it's easier to pull frequently changed information into one place (a resources section) rather than scatter it through ...