Class DataGridCellsPanel
Represents a Panel that lays out cells and column headers in a DataGrid when MaxHeaderStackCount is greater than 1.
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation.Controls
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
[SuppressMessage("Performance", "CA1814:Prefer jagged arrays over multidimensional", Justification = "The multidimensional array does not waste space. Also refactoring with possible bugs.")]
[SuppressMessage("ReSharper", "LocalizableElement")]
public class DataGridCellsPanel : DataGridCellsPanel, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild
Constructors
View SourceDataGridCellsPanel()
Initializes a new instance of the DataGridCellsPanel class.
Declaration
public DataGridCellsPanel()
Fields
View SourceCellsPanelActualWidthGetter
CellsPanelActualWidthGetter
Declaration
public static readonly Func<DataGrid, double> CellsPanelActualWidthGetter
Field Value
| Type | Description |
|---|---|
| Func<DataGrid, double> |
CellsPanelActualWidthSetter
CellsPanelActualWidthSetter
Declaration
public static readonly Action<DataGrid, double> CellsPanelActualWidthSetter
Field Value
| Type | Description |
|---|---|
| Action<DataGrid, double> |
CellsPresenterInternalItemsHostGetter
CellsPresenterInternalItemsHostGetter
Declaration
public static readonly Func<DataGridCellsPresenter, Panel> CellsPresenterInternalItemsHostGetter
Field Value
| Type | Description |
|---|---|
| Func<DataGridCellsPresenter, Panel> |
CellsPresenterInternalItemsHostSetter
Declaration
public static readonly Action<DataGridCellsPresenter, Panel> CellsPresenterInternalItemsHostSetter
Field Value
| Type | Description |
|---|---|
| Action<DataGridCellsPresenter, Panel> |
ColumnHeadersPresenterInternalItemsHostGetter
Declaration
public static readonly Func<DataGridColumnHeadersPresenter, Panel> ColumnHeadersPresenterInternalItemsHostGetter
Field Value
| Type | Description |
|---|---|
| Func<DataGridColumnHeadersPresenter, Panel> |
ColumnHeadersPresenterInternalItemsHostSetter
Declaration
public static readonly Action<DataGridColumnHeadersPresenter, Panel> ColumnHeadersPresenterInternalItemsHostSetter
Field Value
| Type | Description |
|---|---|
| Action<DataGridColumnHeadersPresenter, Panel> |
ColumnMeasurementProperty
Identifies the DependencyProperty for GetColumnMeasurement(DependencyObject) and SetColumnMeasurement(DependencyObject, ColumnMeasurementState[]).
Declaration
public static readonly DependencyProperty ColumnMeasurementProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
HorizontalOffsetProperty
Identifies the DependencyProperty for HorizontalOffset.
Declaration
public static readonly DependencyProperty HorizontalOffsetProperty
Field Value
| Type | Description |
|---|---|
| DependencyProperty |
NonFrozenColumnsViewportHorizontalOffsetSetter
Declaration
public static readonly Action<DataGrid, double> NonFrozenColumnsViewportHorizontalOffsetSetter
Field Value
| Type | Description |
|---|---|
| Action<DataGrid, double> |
RowsPresenterAvailableSizeGetter
Declaration
public static readonly Func<DataGridRowsPresenter, Size> RowsPresenterAvailableSizeGetter
Field Value
| Type | Description |
|---|---|
| Func<DataGridRowsPresenter, Size> |
Properties
View SourceHorizontalOffset
Gets or sets the horizontal scroll offset.
Declaration
public double HorizontalOffset { get; set; }
Property Value
| Type | Description |
|---|---|
| double | The horizontal scroll offset. |
Methods
View SourceArrangeOverride(Size)
Arranges the content of a VirtualizingStackPanel element.
Declaration
protected override Size ArrangeOverride(Size arrangeSize)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | arrangeSize | The Size that this element should use to arrange its child elements. |
Returns
| Type | Description |
|---|---|
| Size | The Size that represents the arranged size of this VirtualizingStackPanel element and its child elements. |
Overrides
View SourceGetColumnMeasurement(DependencyObject)
Gets the column measurement for the DataGrid.
Declaration
protected static DataGridCellsPanel.ColumnMeasurementState[] GetColumnMeasurement(DependencyObject element)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element to get the column measurement for. Generally a DataGrid. |
Returns
| Type | Description |
|---|---|
| ColumnMeasurementState[] | An array with all header column widths. |
MeasureOverride(Size)
Determines the desired size of the panel.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | constraint | The maximum size that the panel can occupy. |
Returns
| Type | Description |
|---|---|
| Size | The desired size of the panel. |
Overrides
View SourceOnIsItemsHostChanged(bool, bool)
Indicates that the IsItemsHost property value has changed.
Declaration
protected override void OnIsItemsHostChanged(bool oldIsItemsHost, bool newIsItemsHost)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | oldIsItemsHost | The old value of the IsItemsHost property. |
| bool | newIsItemsHost | The new value of the IsItemsHost property. |
Overrides
View SourceOnItemsChanged(object, ItemsChangedEventArgs)
Called when the Items collection that is associated with the ItemsControl for this Panel changes.
Declaration
[SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Parameter 'args' is never null.")]
protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | The object that raised the event. |
| ItemsChangedEventArgs | args | Provides data for the ItemsChanged event. |
Overrides
View SourcePartition(IEnumerable<int>, bool)
Declaration
[SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Used as instance method.")]
public IEnumerable<DataGridCellsPanel.Range> Partition(IEnumerable<int> values, bool reverse = false)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<int> | values | |
| bool | reverse |
Returns
| Type | Description |
|---|---|
| IEnumerable<DataGridCellsPanel.Range> |
PrepareItemContainer(UIElement)
Called when the item container has been prepared.
Declaration
protected virtual void PrepareItemContainer(UIElement container)
Parameters
| Type | Name | Description |
|---|---|---|
| UIElement | container | The container. |
SetColumnMeasurement(DependencyObject, ColumnMeasurementState[])
Sets the column measurement for the DataGrid.
Declaration
protected static void SetColumnMeasurement(DependencyObject element, DataGridCellsPanel.ColumnMeasurementState[] value)
Parameters
| Type | Name | Description |
|---|---|---|
| DependencyObject | element | The element to set the column measurement for. Generally a DataGrid. |
| ColumnMeasurementState[] | value | The header column widths to set. |