September 2012
Intermediate to advanced
464 pages
10h 55m
English
Styles provide a convenient way to group a set of properties (and triggers) under a single object, and then selectively (or automatically as we'll see later) apply it to elements. In this recipe, we'll create some styles and apply them to elements to show how useful these are in any application.
Make sure Visual Studio is up and running.
We'll create a calculator-like user interface and use styles to change its look:
CH08.StyledCalculator.MainWindow.xaml and change the following Window properties:Title="Styled Calculator" SizeToContent="WidthAndHeight" ResizeMode="CanMinimize"
Grid, all with auto sizing:<Grid.ColumnDefinitions> ...