In This Article

SelectionBehavior Class

Provides attached behavior for DataGrid controls to track the selection.

public static class SelectionBehavior
Inheritance:
object object

Methods

GetIsSelectedHeader(DataGridColumnHeader)

Gets a value indicating whether a DataGridColumnHeader corresponds to the column of the a currently selected DataGridCell.

public static bool GetIsSelectedHeader(DataGridColumnHeader obj)
Parameter Type Description
obj DataGridColumnHeader

The object from which the property value is read.

Returns

bool:

The object's value.

GetTrackingModes(DataGrid)

Gets the value of the TrackingModesProperty attached property for a specified DataGrid.

public static SelectionTrackingModes GetTrackingModes(DataGrid obj)
Parameter Type Description
obj DataGrid

The object to which the attached property is retrieved.

Returns

SelectionTrackingModes:

The selections that should be tracked in a DataGrid.

SetTrackingModes(DataGrid, SelectionTrackingModes)

Sets the value of the TrackingModesProperty attached property to a specified DataGrid.

public static void SetTrackingModes(DataGrid obj, SelectionTrackingModes value)
Parameter Type Description
obj DataGrid

The object to which the attached property is written.

value SelectionTrackingModes

A value indicating the selections that should be tracked in a DataGrid.

Fields

IsSelectedHeaderProperty

Identifies the IsSelectedHeader attached dependency property. This field is read-only.

public static readonly DependencyProperty IsSelectedHeaderProperty

TrackingModesProperty

Identifies the TrackingModes attached dependency property. This field is read-only.

public static readonly DependencyProperty TrackingModesProperty

Inherited Members