| Title Page | 1 |
---|
| Copyright Page | 2 |
---|
| Contents at a Glance | 4 |
---|
| Table of Contents | 5 |
---|
| About the Author | 16 |
---|
| Acknowledgments | 17 |
---|
| Introduction | 18 |
---|
| Overview | 18 |
| What This Book Includes | 20 |
| Is This Book for You? | 20 |
| What Do You Need to Use This Book? | 21 |
| How the Book Is Organized | 21 |
| Using Code Examples | 23 |
| Customer Support | 23 |
| CHAPTER 1 Overview of WPF Programming | 24 |
---|
| New features in WPF | 24 |
| XAML Basics | 25 |
| Why Is XAML Needed? | 25 |
| Creating XAML Files | 25 |
| Code-Behind Files | 26 |
| Your First WPF Program | 27 |
| Properties in XAML | 28 |
| Event Handlers in Code-Behind Files | 28 |
| Code-Only Example | 30 |
| XAML-Only Example | 32 |
| CHAPTER 2 2D Transformations | 34 |
---|
| Basics of Matrices and Transformations | 34 |
| Vectors and Points | 34 |
| Scaling | 35 |
| Reflection | 36 |
| Rotation | 36 |
| Translation | 37 |
| Homogeneous Coordinates | 38 |
| Translation in Homogeneous Coordinates | 38 |
| Scaling in Homogeneous Coordinates | 39 |
| Rotation in Homogeneous Coordinates | 40 |
| Combining Transforms | 41 |
| Vectors and Matrices in WPF | 42 |
| Vector Structure | 42 |
| Matrix Structure | 44 |
| Matrix Operations | 45 |
| Matrix Transforms | 48 |
| Creating Perpendicular Lines | 54 |
| Object Transformations in WPF | 59 |
| MatrixTransform Class | 61 |
| ScaleTransform Class | 65 |
| TranslateTransform Class | 68 |
| RotateTransform Class | 71 |
| SkewTransform Class | 75 |
| Composite Transforms | 78 |
| CHAPTER 3 WPF Graphics Basics in 2D | 81 |
---|
| 2D Coordinate Systems in WPF | 81 |
| Default Coordinates | 81 |
| Custom Coordinates | 84 |
| Custom Coordinates for 2D Charts | 89 |
| 2D Viewport | 94 |
| Zooming and Panning | 95 |
| Resizable Canvas | 98 |
| Basic 2D Graphics Shapes in WPF | 102 |
| Lines | 102 |
| Rectangles and Ellipses | 104 |
| Polylines | 108 |
| Polygons | 110 |
| Paths and Geometries | 113 |
| Line, Rectangle, and Ellipse Geometries | 114 |
| GeometryGroup Class | 115 |
| CombinedGeometry Class | 117 |
| PathGeometry Class | 120 |
| Lines and Polylines | 121 |
| Arcs | 121 |
| Bezier Curves | 122 |
| Geometry and Mini-Language | 124 |
| Hit Testing | 127 |
| Custom Shapes | 130 |
| Star Class | 130 |
| ArrowLine Class | 134 |
| Testing Custom Shapes | 139 |
| CHAPTER 4 Colors and Brushes | 144 |
---|
| Colors | 144 |
| System Colors | 145 |
| Color Picker | 148 |
| Brushes | 155 |
| SolidColorBrush | 155 |
| LinearGradientBrush | 158 |
| RadialGradientBrush | 162 |
| DrawingBrush | 165 |
| Custom Colormap and Shading | 168 |
| Custom Colormap Brushes | 168 |
| Testing Colormap Brushes | 174 |
| Color Shading | 176 |
| Testing Color Shading | 180 |
| CHAPTER 5 2D Line charts | 183 |
---|
| Simple Line Charts | 183 |
| Creating Simple Line Charts | 183 |
| How It Works | 186 |
| Line Charts with Data Collection | 186 |
| Chart Style | 186 |
| Data Series | 188 |
| Data Collection | 190 |
| Creating Line Charts | 191 |
| Gridlines and Labels | 194 |
| Chart Style with Gridlines | 194 |
| Creating a Chart with Gridlines | 199 |
| Legends | 203 |
| Legend Class | 203 |
| Creating a Chart with a Legend | 208 |
| Symbols | 212 |
| Defining Symbols | 212 |
| Symbols Class | 213 |
| Creating a Chart with Symbols | 220 |
| Line Charts with Two Y Axes | 223 |
| Why We Need Two Y Axes | 223 |
| Chart Style with Two Y Axes | 225 |
| DataSeries and DataCollection with Two Y Axes | 231 |
| Creating a Chart with Two Y Axes | 233 |
| CHAPTER 6 Specialized 2D Cha
|