DataItems Property

Returns a collection used to add items directly into the control.
Public ReadOnly Property DataItems As DataPresenterBase.DataItemsCollection
public DataPresenterBase.DataItemsCollection DataItems {get;}

This property is specified as the control's 'Content' property which means that in xaml you can add items to this collection without having to explicitly create enclosing tags identifying this property. Any objects specified within the control's tags will automatically get added to this collection.

Note: This property is mutually exclusive with the DataSource property, trying to set the DataSource property and add items directly to this collection will cause an InvalidOperationException to be thrown.


Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also