O'Reilly logo

Pro WPF in C# 2008: Windows Presentation Foundation with .NET 3.5, Second Edition by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Object Resources

Assembly resources are nothing new to .NET developers. However, WPF also introduces a new resource system that integrates closely with XAML. This system allows you to define resources in a variety of places in your markup (along with specific controls, in specific windows, or across the entire application) and then reuse it easily.

Object resources have a number of important benefits:

  • Efficiency. Resources let you define an object once and use it in several places in your markup. This streamlines your code and makes it marginally more efficient.

  • Maintainability. Resources let you take low-level formatting details (such as font sizes) and move them to a central place where they're easy to change. It's the XAML equivalent of creating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required