-
Book Overview & Buying
-
Table Of Contents
Windows Application Development Cookbook
By :
Page-limited styles are a powerful mechanism to design the various elements on the page consistently. However, what should you do to make the whole application consistent? Do you need to copy such styles to all the pages? Absolutely not, because you can move the definition of styles to the App.xaml file to use them in the whole application. You will learn how to do it in this recipe.
As an example, you will create a simple menu page with a few buttons, such as Dashboard, News, and Gallery. To make the design consistent across the whole application, all buttons should have the same appearance specified by the global style.
To step through this recipe, you only need the automatically generated project.
To prepare a simple menu page with a globally-defined style for buttons, you need to perform the following steps:
Specify the global style for the Button and ScrollViewer controls by modifying the content of the App.xaml file as follows:
...