Free mag vol1 | Page 47

 CONTENTS  Chapter 29: WPF Graphics Rendering Services ................................................1223 Understanding WPF’s Graphical Rendering Services ..................................................1223 WPF Graphical Rendering Options...................................................................................................... 1224 Rendering Graphical Data Using Shapes .....................................................................1225 Adding Rectangles, Ellipses, and Lines to a Canvas .......................................................................... 1227 Removing Rectangles, Ellipses, and Lines from a Canvas ................................................................. 1230 Working with Polylines and Polygons................................................................................................. 1231 Working with Paths ............................................................................................................................ 1232 WPF Brushes and Pens................................................................................................1236 Configuring Brushes Using Visual Studio ........................................................................................... 1236 Configuring Brushes in Code .............................................................................................................. 1239 Configuring Pens ................................................................................................................................ 1240 Applying Graphical Transformations............................................................................1241 A First Look at Transformations ......................................................................................................... 1242 Transforming Our Canvas Data........................................................................................................... 1243 Working with the Visual Studio Transform Editor ........................................................1245 Building the Initial Layout ................................................................................................................... 1245 Applying Transformations at Design Time.......................................................................................... 1247 Transforming the Canvas in Code....................................................................................................... 1249 Rendering Graphical Data Using Drawings and Geometries........................................1250 Building a DrawingBrush Using Geometries....................................................................................... 1251 Painting with the DrawingBrush......................................................................................................... 1252 Containing Drawing Types in a DrawingImage................................................................................... 1253 The Role of Expression Design ....................................................................................1254 Exporting a Sample Design File As XAML........................................................................................... 1254 Importing the Graphical Data into a WPF Project ............................................................................... 1256 Interacting with the Bear.................................................................................................................... 1258 xlv