dotnetmonitor.com |
|
||||||||||||
| The Windows Forms V1.0 and V1.0 designer
required an instance of a type to exist at design time in order to setup design
time data binding. The BindingSource provides type binding services such that it
can project a type to bound controls as an empty list of that type. This
enables both design time and runtime binding to factory based business objects:
public void Initialize() { // Design time setup _bs = new BindingSource();
// Design time (or run-time binding to type) // Controls bound to the BindingSource will act as if they are bound to an empty // typed list of Customers _dc.DataSource = typeof(Customer); } |
||||||||||||
|
||||||||||||