16. Data Binding Basics
Much of what Windows Forms applications do is to provide users with a nice way to work with data. Much of the data that users work with resides in a wide variety of data stores, commonly databases and file systems. Th...
The Land before Data Binding
Logically, data binding is the association of object properties with control properties, facilitated by a data binding engine. Conceivably, you could create a data binding engine using your own code. For example, consi...
Simple Data Binding and Item Data Sources
The fundamental building block of the Windows Forms data binding engine is the Binding object, which binds control properties to object properties:
// RaceCarDriver.cs
class RaceCarDriver {}
// Sim...
Simple Binding and List Data Sources
A list data source is exactly what it sounds like: a collection of homogenous objects to be used as data in a binding operation. The minimum implementation that is considered a list data source by the Windows F...
Complex Binding and List Data Sources
Whereas simple binding to list data sources binds a control property to a property on the current object of a list data source, complex binding binds a control property to an entire list data source. The &qu...
IBindingList
The minimum level of usable data binding functionality for list data sources really comprises all that we've seen so far:
Support for both simple and complex binding modelsThe ability to add, update, and delete items on both bound co...
BindingList<T>
BindingList<T>, from the System.ComponentModel namespace, is a generic implementation of IBindingList:
class BindingList<T> : IBindingList, {}
BindingList<T> nicely implements the list ma...
The BindingSource Component
BindingList<T> allows us to use almost any class to create a data-binding-savvy strongly typed list data source. However, some item classes come already associated with their own collection classes. Al...
Design-Time Data Sources
You use VS05's Data Sources window to identify and create data sources for a project. You open the Data Sources window, shown in Figure 16.15, by choosing Data | Show Data Sources from the VS05 main menu.
...
Binding UI Elements in the Designer
A BindingSource that is bound to an underlying data source can do wonderful things; part of BindingSource's magic lies in its ability to use reflection to inspect its data source for data members and data proper...
Where Are We?
In this chapter, we've covered the fundamental elements of data binding in Windows Forms. We started by looking at the underlying mechanics and how they can be used to build a list data source that supports basic data binding functio...
AJAX popular information C# language guides Windows books and cookbooks
.......
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.