CONTENTS
The Intrinsic Command Objects.......................................................................................................... 1186
Connecting Commands to the Command Property............................................................................. 1187
Connecting Commands to Arbitrary Actions....................................................................................... 1188
Working with the Open and Save Commands .................................................................................... 1190
A Deeper Look at WPF APIs and Controls ....................................................................1192
Working with the TabControl ............................................ .................................................................. 1192
Building the Ink API Tab...............................................................................................1195
Designing the ToolBar ........................................................................................................................ 1196
The RadioButton Control..................................................................................................................... 1199
Handling Events for the Ink API Tab ................................................................................................... 1201
The InkCanvas Control........................................................................................................................ 1202
The ComboBox Control ....................................................................................................................... 1205
Saving, Loading, and Clearing InkCanvas Data .................................................................................. 1206
Introducing the Documents API ...................................................................................1207
Block Elements and Inline Elements .................................................................................................. 1208
Document Layout Managers............................................................................................................... 1208
Building the Documents Tab........................................................................................1209
Populating a FlowDocument Using Code............................................................................................ 1210
Enabling Annotations and Sticky Notes.............................................................................................. 1211
Saving and Loading a Flow Document ............................................................................................... 1213
Introducing the WPF Data-Binding Model....................................................................1214
Building the Data Binding Tab ............................................................................................................ 1214
Establishing Data Bindings Using Visual Studio ................................................................................. 1215
The DataContext Property................................................................................................................... 1217
Data Conversion Using IValueConverter ............................................................................................. 1218
Establishing Data Bindings in Code.................................................................................................... 1219
Building the DataGrid Tab................................................................................................................... 1219
Summary .....................................................................................................................1221
xliv