CHAPTER 10

Image

Resources

WPF’s resource system is simply a way of keeping around a set of useful objects, such as commonly used brushes, styles, or templates, so you can reuse them more easily.

Although you can create and manipulate resources in code, you’ll usually define them in your XAML markup. After a resource is defined, you can use it throughout the rest of the markup in your window (or, in the case of an application resource, throughout the rest of your application). This technique simplifies your markup, saves repetitive coding, and allows you to store user interface details (such as your application’s color scheme) in a central place so ...

Get Pro WPF 4.5 in C#: Windows Presentation Foundation in .NET 4.5, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.