In This Article

SelectionBehavior Class

Provides attached behavior for System.Windows.Controls.DataGrid controls to track the selection.

public static class SelectionBehavior
Inheritance:
System.Object Object

Methods

GetIsSelectedHeader(DataGridColumnHeader)

Gets a value indicating whether a System.Windows.Controls.Primitives.DataGridColumnHeader corresponds to the column of the a currently selected DataGridCell.

public static bool GetIsSelectedHeader(DataGridColumnHeader obj)
Parameter Type Description
obj System.Windows.Controls.Primitives.DataGridColumnHeader

The object from which the property value is read.

Returns

System.Boolean:

The object's value.

GetTrackingModes(DataGrid)

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

public static SelectionTrackingModes GetTrackingModes(DataGrid obj)
Parameter Type Description
obj System.Windows.Controls.DataGrid

The object to which the attached property is retrieved.

Returns

SelectionTrackingModes:

The selections that should be tracked in a System.Windows.Controls.DataGrid.

SetTrackingModes(DataGrid, SelectionTrackingModes)

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

public static void SetTrackingModes(DataGrid obj, SelectionTrackingModes value)
Parameter Type Description
obj System.Windows.Controls.DataGrid

The object to which the attached property is written.

value SelectionTrackingModes

A value indicating the selections that should be tracked in a System.Windows.Controls.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

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()