IDataItemContainer.DataItem Property

Definition

When implemented, gets an object that is used in simplified data-binding operations.

C#
public object DataItem { get; }

Property Value

An object that represents the value to use when data-binding operations are performed.

Examples

The following code example demonstrates how to implement a type that uses the IDataItemContainer interface. The SimpleSpreadsheetRow class is a container class with a member named Data. It implements the IDataItemContainer interface by mapping the Data property to the DataItem property. Simplified data-binding expressions can bind to the data object using the DataItem property.

C#
object IDataItemContainer.DataItem
{
    get
    {
        return Data;
    }
}

Remarks

The DataItem property identifies an object that is used in data-binding operations and late-binding expressions.

Applies to

Produkt Verzie
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also