| Visual Basic (Declaration) | |
|---|---|
Public ReadOnly Property ItemProperties As ObservableCollection(Of DataGridItemProperty) | |
| C# | |
|---|---|
public ObservableCollection<DataGridItemProperty> ItemProperties {get;} | |
Return Value
An ObservableCollection of DataGridItemProperty objects, which represent the items that are contained in the underlying collection.
The ItemProperties collection contains a list of DataGridItemProperty objects that can be added or removed and that contain information relative to their corresponding item (you could consider these items to be the columns that will end up in a grid).
When binding a grid to a DataGridCollectionView or DataGridCollectionViewSource (in XAML), it is recommended to use the ItemProperties property to add or remove the columns the will end up in the Columns collection and leave the AutoCreateColumns property to true.
By default, the ItemProperties collection is empty to indicate that all the items will be used to create a grid's columns. In this situation, to access the item properties, the ItemProperties collection of the underlying DataGridCollectionView, which can be accessed through the View property, must be used.
If an item is added to the ItemProperties, then both the ItemProperties collections of the DataGridCollectionViewSource and DataGridCollectionView will contain the items.
Supported Frameworks: Microsoft .NET Framework version 3.5