ItemProperties Property
See Also 
Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > DataGridCollectionViewSource Class : ItemProperties Property

Gets a collection of DataGridItemProperty objects, which represent the items that are contained in the underlying collection.

Syntax

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.

Remarks

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.

Notes

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.

Requirements

Supported Frameworks: Microsoft .NET Framework version 3.5

See Also