Introduction 1Who Should Read This Book? 2Code Examples 2How This Book Is Organized 2Conventions Used in This Book 4Part I: The XAML LanguageChapter 1: What Is XAML? 5Elements and Attributes 6Namespaces 9Property Elements 11Summary 13Chapter 2: Child Elements and Keywords 15Children of Object Elements 15XAML Keywords 19Summary 22Chapter 3: Mixing XAML with Code 23Loading and Parsing XAML at Runtime 23Compiling XAML 26Summary 30Chapter 4: Extending XAML 31Type Converters 31Using Arbitrary Types in XAML 34Markup Extensions 38Some Notes About XAML2009 40Summary 45Part II: GraphicsChapter 5: Arranging Elements 47Controlling Size 48Controlling Position 52Applying 2D Transforms 55Applying 3D Transforms 63Summary 66Chapter 6: Automatic Layout 67Canvas 68StackPanel 71DockPanel 72Grid 75VariableSizedWrapGrid and WrapPanel 84Primitive Panels 87Handling Content Overflow 89Summary 97Chapter 7: 2D Graphics 99Shapes 99Geometries 107Brushes 115Summary 129Chapter 8: 3D Graphics 131Getting Started with 3D Graphics 131Cameras and Coordinate Systems 135Transform3D 147Model3D 157Visual3D 181Viewport3D 1862D and 3D Coordinate System Transformation 187Summary 195Part III: ControlsChapter 9: Content Controls 197Button 198HyperlinkButton 199RepeatButton 200ToggleButton 201CheckBox 201RadioButton 202ToolTip 203Summary 205Chapter 10: Items Controls 207Items in the Control 208Items Panels 209ComboBox 212ListBox 214ListView 215GridView 219Summary 220Chapter 11: Images 221The Image Element 222Multiple Files for Multiple Environments 231Decoding Images 236Encoding Images 244Summary 252Chapter 12: Text 253TextBlock 253RichTextBlock 265TextBox 270RichEditBox 276PasswordBox 279Summary 279Chapter 13: Audio and Video 281Playback 281Capture 292Transcoding 303Summary 308Chapter 14: Other Controls 311Range Controls 311Popup 314Hub 316DatePicker 322TimePicker 323ProgressRing 324ToggleSwitch 325Summary 326Chapter 15: User Controls and Custom Controls 327Creating a User Control 328Creating a Custom Control 331Summary 340Part IV: Exploring XAML FeaturesChapter 16: Resources 341Binary Resources 341Logical Resources 348Summary 355Chapter 17: Data Binding 357Introducing Binding 357Controlling Rendering 366Customizing the View of a Collection 374Summary 378Chapter 18: Styles, Templates, and Visual States 379Styles 380Templates 386Visual States 395Summary 404Chapter 19: Animation 405Theme Transitions 406Theme Animations 417Custom Animations 422Custom Keyframe Animations 435Easing Functions 439Manual Animations 444Summary 446Part V: Advanced FeaturesChapter 20: Layout with Custom Panels 447Communication Between Parents and Children 448Creating a SimpleCanvas 451Creating a SimpleStackPanel 455Creating a UniformGrid 458Summary 463Chapter 21: Fun with XAML Readers and Writers 465System.Xaml Overview 465The Node Loop 468Reading XAML 469Writing to Live Objects 473Writing to XML 475XamlServices 476Summary 478Index 479
Adam Nathan is a principal software architect for Microsoft, a best-selling technical author, and a prolific developer of apps for Windows. He introduced XAML to countless developers through his books on a variety of Microsoft technologies. Currently a part of the Windows team, Adam has previously worked on Visual Studio and the Common Language Runtime. He was the founding developer and architect of Popfly, Microsoft's first Silverlight-based product, named by PCWorld as one of its year's most innovative products. He is also the founder of PINVOKE.NET, the online resource for .NET developers who need to access Win32. His apps have been featured on Lifehacker, Gizmodo, ZDNet, ParentMap, and other enthusiast sites.Adam's books are considered required reading by many inside Microsoft and throughout the industry. Adam is the author of Windows 8.1 Apps with XAML and C# Unleashed (Sams, 2013), 101 Windows Phone 7 Apps (Sams, 2011), Silverlight 1.0 Unleashed (Sams, 2008), WPF 4.5 Unleashed (Sams, 2013), .NET and COM: The Complete Interoperability Guide (Sams, 2002), and several others. You can find Adam online at www.adamnathan.net or @adamnathan on Twitter.