Gets the list of cells that are currently selected.
Assembly: PresentationFramework (in PresentationFramework.dll)
There are three selection modes for DataGrid. The selection mode is set with the SelectionUnit property. Depending on the SelectionUnit, or SelectedItems will contain a collection of selected items as defined in the following table.
Collection of selected cells
Collection of cells in the selected rows
Collection of selected rows
Collection of selected cells, including all cells in a selected row
Collection of selected rows or empty if no full rows are selected
When the selection changes, the SelectionChanged and SelectedCellsChanged events are raised if the new or old selection contains a row. The SelectionChanged event is not raised if the new or old selection contains only cells.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)