IDataItemContainer.DataItem IDataItemContainer.DataItem IDataItemContainer.DataItem IDataItemContainer.DataItem Property

定義

實作時,取得簡化資料繫結作業中所使用的 objectWhen implemented, gets an object that is used in simplified data-binding operations.

public:
 property System::Object ^ DataItem { System::Object ^ get(); };
public object DataItem { get; }
member this.DataItem : obj
Public ReadOnly Property DataItem As Object

屬性值

object,表示執行資料繫結作業時所使用的值。An object that represents the value to use when data-binding operations are performed.

範例

下列程式碼範例示範如何執行使用IDataItemContainer介面的型別。The following code example demonstrates how to implement a type that uses the IDataItemContainer interface. 類別是具有名為Data之成員的容器類別。 SimpleSpreadsheetRowThe SimpleSpreadsheetRow class is a container class with a member named Data. 它會藉IDataItemContainer由將Data屬性對應至DataItem屬性來實作為介面。It implements the IDataItemContainer interface by mapping the Data property to the DataItem property. 簡化的資料系結運算式可以使用DataItem屬性系結至資料物件。Simplified data-binding expressions can bind to the data object using the DataItem property.

object IDataItemContainer.DataItem
{
    get
    {
        return Data;
    }
}
ReadOnly Property DataItem() As Object Implements IDataItemContainer.DataItem
    Get
        Return Data
    End Get
End Property

備註

DataItem屬性會識別用於資料系結作業和晚期繫結運算式中的物件。The DataItem property identifies an object that is used in data-binding operations and late-binding expressions.

適用於

另請參閱