Class DataGridColumnHeader
Represents an individual DataGrid column header.
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[TemplatePart(Name = "PART_RightHeaderGripper", Type = typeof(Thumb))]
[TemplatePart(Name = "PART_LeftHeaderGripper", Type = typeof(Thumb))]
[TemplatePart(Name = "PART_HitTest", Type = typeof(FrameworkElement))]
public class DataGridColumnHeader : DataGridColumnHeader, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, ICommandSource
Remarks
The template part "PART_HitTest" is an element that is used for hit testing during dragging. It should contain 4 different FrameworkElements that should have an Edge as Tag to define regions for drop locations.
Fields
View SourceDataGridColumnProperty
Identifies the DependencyProperty for DataGridColumn.
Declaration
public static readonly DependencyProperty DataGridColumnProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
DataGridColumnPropertyKey
Identifies the DependencyPropertyKey for DataGridColumn.
Declaration
protected static readonly DependencyPropertyKey DataGridColumnPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
IsFirstColumnProperty
Identifies the DependencyProperty for IsFirstColumn.
Declaration
public static readonly DependencyProperty IsFirstColumnProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsFirstColumnPropertyKey
Identifies the DependencyPropertyKey for IsFirstColumn.
Declaration
protected static readonly DependencyPropertyKey IsFirstColumnPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
IsFirstRowProperty
Identifies the DependencyProperty for IsFirstRow.
Declaration
public static readonly DependencyProperty IsFirstRowProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsFirstRowPropertyKey
Identifies the DependencyPropertyKey for IsFirstRow.
Declaration
protected static readonly DependencyPropertyKey IsFirstRowPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
IsLastColumnProperty
Identifies the DependencyProperty for IsLastRow.
Declaration
public static readonly DependencyProperty IsLastColumnProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsLastColumnPropertyKey
Identifies the DependencyPropertyKey for IsLastColumn.
Declaration
protected static readonly DependencyPropertyKey IsLastColumnPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
IsLastRowProperty
Identifies the DependencyProperty for IsLastRow.
Declaration
public static readonly DependencyProperty IsLastRowProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
IsLastRowPropertyKey
Identifies the DependencyPropertyKey for IsLastRow.
Declaration
protected static readonly DependencyPropertyKey IsLastRowPropertyKey
Field Value
| Type | Description |
|---|---|
| DependencyPropertyKey |
Properties
View SourceDataGridColumn
Gets the DataGridColumn associated to this header.
Declaration
public DataGridColumn DataGridColumn { get; }
Property Value
| Type | Description |
|---|---|
| DataGridColumn |
Remarks
This is the same as DataGridColumnHeader but as a DependencyProperty.
IsFirstColumn
Gets or sets a value indicating whether the header is inside the first column.
Declaration
public bool IsFirstColumn { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsFirstRow
Gets or sets a value indicating whether the header is inside the first row.
Declaration
public bool IsFirstRow { get; protected set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsLastColumn
Gets or sets a value indicating whether the header is inside the last column.
Declaration
public bool IsLastColumn { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsLastRow
Gets or sets a value indicating whether the header is inside the last row.
Declaration
public bool IsLastRow { get; protected set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceOnApplyTemplate()
Builds the visual tree for the column header when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
View SourceOnClearContainer()
Called when the container is cleared.
Declaration
protected void OnClearContainer()
Remarks
Sets DataGridColumn to null.
OnClick()
Raises the Click event and initiates sorting.
Declaration
protected override void OnClick()
Overrides
View SourceOnLostMouseCapture(MouseEventArgs)
Called when this header looses mouse capture.
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter 'e' is never null.")]
protected override void OnLostMouseCapture(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e | The event data for the System.Windows.Input.Mouse.LostMouseCapture event. |
Overrides
Remarks
This will notify the parent DataGridColumnHeadersPresenter of the lost mouse capture.
OnMouseLeftButtonDown(MouseButtonEventArgs)
Called when the left mouse button is pressed on this header.
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter 'e' is never null.")]
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseButtonEventArgs | e | The event data. |
Overrides
Remarks
This will notify the parent DataGridColumnHeadersPresenter of the pressed mouse button and start mouse capture when ClickMode is Hover.
OnMouseLeftButtonUp(MouseButtonEventArgs)
Called when the left mouse button is released on this header.
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter 'e' is never null.")]
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseButtonEventArgs | e | The event data. |
Overrides
Remarks
This will notify the parent DataGridColumnHeadersPresenter of the released mouse button.
OnMouseMove(MouseEventArgs)
Called when the mouse is moved over this header.
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter 'e' is never null.")]
protected override void OnMouseMove(MouseEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseEventArgs | e | The event data. |
Overrides
Remarks
This will notify the parent DataGridColumnHeadersPresenter of the mouse move.
OnPrepareContainer()
Called when the container is prepared.
Declaration
protected void OnPrepareContainer()
Remarks
Sets DataGridColumn to Column.