Chapter 7. Structuring Applications
So far, we have covered topics that discuss how to build Silverlight applications. In this chapter we are going to put it aside for a bit and take a look at how to make our code look better and behave better. We will discuss how to utilize sample data while using binding, how to arrange styles in a smart way using resource dictionaries, how to localize an application, and finish off with how to handle events at the application level.
In this chapter we will cover the following topics:
Creating and consuming resource dictionaries
Implementing localization and globalization
Handling application-level events
Creating and consuming resource dictionaries
When we discussed styles in Chapter 3, Enhancing the User Interface, we realized that styles can be placed in various scopes throughout our application. Most of the time we will place styles at the global level, which means our App.xaml
file may get messy quite fast. A commonly used strategy to enhance the App.xaml...