In This Article

FocusBehavior Class

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

public static class FocusBehavior
Inheritance:
System.Object Object

Methods

GetIsFocusedHeader(DataGridColumnHeader)

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

public static bool GetIsFocusedHeader(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 FocusTrackingModes GetTrackingModes(DataGrid obj)
Parameter Type Description
obj System.Windows.Controls.DataGrid

The object to which the attached property is retrieved.

Returns

FocusTrackingModes:

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

SetTrackingModes(DataGrid, FocusTrackingModes)

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

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

The object to which the attached property is written.

value FocusTrackingModes

A value indicating the focus that should be tracked in a System.Windows.Controls.DataGrid.

Fields

IsFocusedHeaderProperty

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

public static readonly DependencyProperty IsFocusedHeaderProperty

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()