Regardless of what element you are binding and the nature of your data source, each binding always follows the model illustrated by the following figure:
Basic data binding diagram
As illustrated by the above figure, data binding is essentially the bridge between your binding target and your binding source. The figure demonstrates the following fundamental WPF data binding concepts:
Typically, each binding has these four components: a binding target object, a target property, a binding source, and a path to the value in the binding source to
This section contains the following subsections.
* Direction of the Data Flow
* What Triggers Source Updates
Regardless of what element you are binding and the nature of your data source, each binding always follows the model illustrated by the following figure:
Basic data binding diagram
As illustrated by the above figure, data binding is essentially the bridge between your binding target and your binding source. The figure demonstrates the following fundamental WPF data binding concepts:
*
Typically, each binding has these four
Introduction
Every once in a while I need to bind an enumerated type to a Windows Forms control, usually a ComboBox. There are lots of articles here on The CodeProject that present various ways to do this, each with their own pros and cons. However, they are generally more complicated than necessary, and in some cases, require a lot of work on either the developer implementing the enum, the developer using it, or both.
The Simple Way
The simplest is to use the Enum.GetValues() method, setting its result to the DataSource property of the ComboBox.
Overview
Data binding provides a way for developers to create a read/write link between the controls on a form and the data in their application (their data model). Classically, data binding was used within applications to take advantage of data stored in databases. Windows Forms data binding allows you to access data from databases as well as data in other structures, such as arrays and collections.
Binding Context
Each Windows Form has at least one BindingContext object that manages the CurrencyManager objects for the form. For each data