Free mag vol1 | Page 48

 CONTENTS Rendering Graphical Data Using the Visual Layer .......................................................1258 Summary .....................................................................................................................1265  Chapter 30: WPF Resources, Animations, and Styles .......................................1267 Understanding the WPF Resource System ..................................................................1267 Working with Binary Resources ......................................................................................................... 1267 Working with Object (Logical) Resources ....................................................................1273 The Role of the Resources Property ................................................................................................... 1274 Defining Window-Wide Resources ..................................................................................................... 1274 The {StaticResource} Markup Extension ......................................................................................... 1277 The {DynamicResource} Markup Extension........................................................................................ 1277 Application-Level Resources .............................................................................................................. 1278 Defining Merged Resource Dictionaries ............................................................................................. 1280 Defining a Resource-Only Assembly .................................................................................................. 1281 Understanding WPF’s Animation Services...................................................................1284 The Role of the Animation Class Types .............................................................................................. 1284 The To, From, and By Properties ........................................................................................................ 1285 The Role of the Timeline Base Class .................................................................................................. 1285 Authoring an Animation in C# Code.................................................................................................... 1286 Controlling the Pace of an Animation ................................................................................................. 1288 Reversing and Looping an Animation ................................................................................................. 1288 Authoring Animations in XAML ....................................................................................1289 The Role of Storyboards ..................................................................................................................... 1290 The Role of Event Triggers ................................................................................................................. 1290 Animation Using Discrete Key Frames ............................................................................................... 1291 Understanding the Role of WPF Styles ........................................................................1292 Defining and Applying a Style............................................................................................................. 1293 Overriding Style Settings .................................................................................................................... 1294 Automatically Applying a Style with TargetType ................................................................................ 1294 xlvi