文件名称:Windows Presentation Foundation 4.5 Cookbook的源码
文件大小:8.14MB
文件格式:ZIP
更新时间:2017-01-19 16:40:15
WPF 4.5 源码
Windows Presentation Foundation 4.5 Cookbook的源码 Chapter 1: Foundations 7 Introduction 7 Creating custom type instances in XAML 9 Creating a dependency property 15 Using an attached property 25 Creating an attached property 28 Accessing a static property from XAML 33 Creating a custom markup extension 37 Handling routed events 44 Chapter 2: Resources 51 Introduction 51 Using logical resources 52 Dynamically binding to a logical resource 57 Using user-selected colors and fonts 59 Using binary resources 63 Accessing binary resources in code 70 Accessing binary resources from another assembly 72 Managing logical resources 76 Chapter 3: Layout and Panels 81 Introduction 81 Creating a table-like user interface 83 Dynamically sizing grid rows/columns 90 Creating a scrollable user interface 92 Creating a border around panels and elements 94 Placing elements in exact positions 96 Adding/removing elements to a panel dynamically 98 Creating a tabbed user interface 100 Implementing drag-and-drop 103 Chapter 4: Using Standard Controls 109 Introduction 109 Working with text 110 Using content controls 114 Displaying images 120 Creating tooltips 126 Creating a list of items 131 Creating a standard menu 134 Creating a context menu 137 Selecting options with checkboxes and radio buttons 139 Manipulating tab order and focus 141 Chapter 5: Application and Windows 145 Introduction 145 Creating a window 145 Creating a dialog box 149 Using the common dialog boxes 153 Creating ownership between windows 156 Creating a custom shaped window 158 Creating a single instance application 162 Handling an unhandled exception 166 Chapter 6: Data Binding 169 Introduction 169 Element to element binding 170 Binding to a single object 173 Binding to a collection 180 Using data templates 184 Using value converters 191 Creating a master-detail view 199 Sorting and filtering bound collections 202 Grouping bound collections 209 Binding to multiple properties 214 Binding hierarchical data to a TreeView 217 Presenting data in a grid 220 Validating data 228 ......