17.4. Organizing Template Resources
When using control templates, you need to decide how broadly you want to share your templates and whether you want to apply them automatically or explicitly.
The first question asks you to think about where you want to use your templates. For example, are they limited to a specific window? In most situations, control templates apply to multiple windows and possibly even the entire application. To avoid defining them more than once, you can define them in the Resources collection of the Application class.
However, this raises another consideration. Often, control templates are shared between applications. It's quite possible that a single application might use templates that have been developed separately. ...
Get Pro WPF in C# 2010: Windows Presentation Foundation in .NET 4 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.