WPF Data Binding Tutorial
I have registered http://www.wpfsharp.com and I will begin to put all my C# and WPF posts there, unless they are Mono related in which case I may post in both places. I’ll leave these posts here, but any updates will be at http://www.wpfsharp.com.
WPF
WPF is an UI framework based on the idea of a “thin UI”. It requires .NET Framework 3.0, 3.5, but the newest features are in .NET Framework 4.0.
Data Binding
Data binding is the idea of creating a link between a piece of code, like a c# property, and a GUI element, such as a WPF Control. When WPF is coded properly to use data binding, the piece of code and the GUI Element automatically stay in sync. For example, a TextBox that is bound to a String property, would see the the TextBox’es text change whenever the String property changes, and whenever the TextBox is changed, the value of the String property changes to match. If that is confusing, follow the tutorial, and seeing an example will clarify the idea of data binding for you.
Chapter 1 – The Basics of WPF and Data Binding
- Introduction to data Binding in WPF
- Binding one element property to another
- Creating a StaticResource and Binding to it
- Binding to a DyamicResource (Coming soon…)
- Multibinding (Coming soon…)
Recommended Videos from WindowsClient.net
- How Do I: Using StringFormat when Multibinding (video 11:00 min)
- How Do I: Use FallbackValue in WPF Binding (video 9:38 min)
Chapter 2 – Controlling Data Binding
- Binding Modes or Directions (Coming soon…)
- Binding Triggers (Coming soon…)
Recommended Videos from WindowsClient.net
- Control How Data is Updated Using Binding Direction (video 13:48 min)
Chapter 3 – Extending Data Binding
- Binding to a member variable object
- Binding to Resources.resx for strings in a WPF Application: A technique to prepare for localization
- Binding to methods encapsulated in an ICommand
- Hooking up Commands to Events in WPF
- Binding to an XML (Coming soon…)
- Binding to an ADO.NET DataTable (Coming soon…)
Chapter 4 – Using Converters and DataTemplateSelectors
- Binding Visibility to a bool value in WPF
- How to add a dynamic image and/or a dynamic button to a DataGrid row using a DataGridTemplateColumn and a DataTemplateSelector?
Chapter 5 – Migrating from Windows Forms
- (Coming soon…)
Recommended Videos from WindowsClient.net
- Layout Techniques for Windows Forms Developers (video 20:19 min)
- How Do I: WinForms WPF Integration (video 11:01 min)
Chapter 6 – Model-View-ViewModel (MVVM)
- MVVM Basics (Coming soon…)
- A Hello World template of a WPF application using MVVM
- Binding to methods encapulated in an ICommand (Review again)
- Simplifying the WPF TreeView by Using the ViewModel Pattern
Recommended Videos from WindowsClient.net
- How Do I: Build Data-driven WPF Application using the MVVM pattern (video 47:23 min)
Chapter 7 – Practical Examples of Data Binding and MVVM
- A Progress Bar using WPF’s Progress Bar Control, BackgroundWorker, and MVVM
- WPF Label, TextBox, and Mnemonics