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

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

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

Defines the IsSelectedHeader attached property.

public static readonly DependencyProperty IsSelectedHeaderProperty

TrackingModesProperty

Defines the TrackingModes attached property.

public static readonly DependencyProperty TrackingModesProperty

Inherited Members