Class TableViewColumn
Represents a column in a TableView.
[StyleTypedProperty(Property = "HeaderStyle", StyleTargetType = typeof(TableViewColumnHeader))]
[StyleTypedProperty(Property = "CellStyle", StyleTargetType = typeof(TableViewCell))]
public abstract class TableViewColumn : DependencyObject, IWinRTObject
- Inheritance
-
objectDependencyObjectTableViewColumn
- Implements
-
IWinRTObject
- Derived
Constructors
TableViewColumn()
Initializes a new instance of the TableViewColumn class with default conditional cell styles.
public TableViewColumn()
Fields
ActualWidthProperty
Identifies the ActualWidth dependency property.
public static readonly DependencyProperty ActualWidthProperty
Field Value
- DependencyProperty
CanFilterProperty
Identifies the CanFilter dependency property.
public static readonly DependencyProperty CanFilterProperty
Field Value
- DependencyProperty
CanReorderProperty
Identifies the CanReorder dependency property.
public static readonly DependencyProperty CanReorderProperty
Field Value
- DependencyProperty
CanResizeProperty
Identifies the CanResize dependency property.
public static readonly DependencyProperty CanResizeProperty
Field Value
- DependencyProperty
CanSortProperty
Identifies the CanSort dependency property.
public static readonly DependencyProperty CanSortProperty
Field Value
- DependencyProperty
CellStyleProperty
Identifies the CellStyle dependency property.
public static readonly DependencyProperty CellStyleProperty
Field Value
- DependencyProperty
ColumnAutoWidthModeProperty
Identifies the ColumnAutoWidthMode dependency property.
public static readonly DependencyProperty ColumnAutoWidthModeProperty
Field Value
- DependencyProperty
ConditionalCellStylesProperty
Identifies the ConditionalCellStyles dependency property.
public static readonly DependencyProperty ConditionalCellStylesProperty
Field Value
- DependencyProperty
HeaderProperty
Identifies the Header dependency property.
public static readonly DependencyProperty HeaderProperty
Field Value
- DependencyProperty
HeaderStyleProperty
Identifies the HeaderStyle dependency property.
public static readonly DependencyProperty HeaderStyleProperty
Field Value
- DependencyProperty
IsReadOnlyProperty
Identifies the IsReadOnly dependency property.
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
- DependencyProperty
MaxWidthProperty
Identifies the MaxWidth dependency property.
public static readonly DependencyProperty MaxWidthProperty
Field Value
- DependencyProperty
MinWidthProperty
Identifies the MinWidth dependency property.
public static readonly DependencyProperty MinWidthProperty
Field Value
- DependencyProperty
OrderProperty
Identifies the Order dependency property.
public static readonly DependencyProperty OrderProperty
Field Value
- DependencyProperty
SortMemberPathProperty
Identifies the SortMemberPath dependency property.
public static readonly DependencyProperty SortMemberPathProperty
Field Value
- DependencyProperty
TagProperty
Identifies the Tag dependency property.
public static readonly DependencyProperty TagProperty
Field Value
- DependencyProperty
VisibilityProperty
Identifies the Visibility dependency property.
public static readonly DependencyProperty VisibilityProperty
Field Value
- DependencyProperty
WidthProperty
Identifies the Width dependency property.
public static readonly DependencyProperty WidthProperty
Field Value
- DependencyProperty
Properties
ActualWidth
Gets or sets the actual width of the column.
public double ActualWidth { get; set; }
Property Value
- double
CanFilter
Gets or sets a value indicating whether the column can be filtered.
public bool CanFilter { get; set; }
Property Value
- bool
CanReorder
Gets or sets a value indicating whether the column can be reordered.
public bool CanReorder { get; set; }
Property Value
- bool
CanResize
Gets or sets a value indicating whether the column can be resized.
public bool CanResize { get; set; }
Property Value
- bool
CanSort
Gets or sets a value indicating whether the column can be sorted. This can be overridden by the TableView.
public bool CanSort { get; set; }
Property Value
- bool
CellStyle
Gets or sets the style that is used to render cells in the column.
public Style CellStyle { get; set; }
Property Value
- Style
ClipboardContentBinding
Gets or sets the data binding used to retrieve cell content when copying to the clipboard. If no explicit clipboard binding is set, the column's OperationContentBinding is returned as a fallback.
public Binding? ClipboardContentBinding { get; set; }
Property Value
- Binding
ColumnAutoWidthMode
Gets or sets the ColumnAutoWidthMode of the column.
public TableViewColumnAutoWidthMode? ColumnAutoWidthMode { get; set; }
Property Value
ConditionalCellStyles
Gets or sets the collection of conditional cell styles for the column.
public IList<TableViewConditionalCellStyle> ConditionalCellStyles { get; set; }
Property Value
Header
Gets or sets the header content of the column.
public object Header { get; set; }
Property Value
- object
HeaderControl
Gets or sets the header control for the column.
public TableViewColumnHeader? HeaderControl { get; }
Property Value
HeaderStyle
Gets or sets the style that is used when rendering the column header.
public Style? HeaderStyle { get; set; }
Property Value
- Style
IsAutoGenerated
Gets or sets a value indicating whether the column is auto-generated.
public bool IsAutoGenerated { get; }
Property Value
- bool
IsFiltered
Gets or sets a value indicating whether the column is filtered.
public bool IsFiltered { get; set; }
Property Value
- bool
IsFrozen
Gets a value indicating whether the column can be horizontally scrolled.
public bool IsFrozen { get; }
Property Value
- bool
IsReadOnly
Gets or sets a value indicating whether the column is read-only.
public bool IsReadOnly { get; set; }
Property Value
- bool
MaxWidth
Gets or sets the maximum width of the column.
public double? MaxWidth { get; set; }
Property Value
- double?
MinWidth
Gets or sets the minimum width of the column.
public double? MinWidth { get; set; }
Property Value
- double?
OperationContentBinding
Gets or sets the optional data binding used to perform operations on cell content, for example sorting, filtering and exporting.
public virtual Binding? OperationContentBinding { get; set; }
Property Value
- Binding
Order
Gets or sets the order in which this column should be displayed.
public int? Order { get; set; }
Property Value
- int?
SortDirection
Gets or sets the sort direction for the column.
public SortDirection? SortDirection { get; set; }
Property Value
SortMemberPath
Gets or sets the member path to use for sorting instead of the default binding path.
public string? SortMemberPath { get; set; }
Property Value
- string
TableView
Gets the owning TableView for the column.
protected TableView? TableView { get; }
Property Value
Tag
Gets or sets a custom tag object for the column.
public object Tag { get; set; }
Property Value
- object
UseSingleElement
Gets or sets a value indicating whether the column uses a single element for display and editing.
public bool UseSingleElement { get; set; }
Property Value
- bool
Visibility
Gets or sets the visibility of the column.
public Visibility Visibility { get; set; }
Property Value
- Visibility
Width
Gets or sets the width of the column.
public GridLength Width { get; set; }
Property Value
- GridLength
Methods
EndCellEditing(TableViewCell, object?, TableViewEditAction, object?)
Called to end the editing session for the cell.
protected virtual void EndCellEditing(TableViewCell cell, object? dataItem, TableViewEditAction editAction, object? uneditedValue)
Parameters
cellTableViewCellThe cell whose editing session is being ended.
dataItemobjectThe data item associated with the cell.
editActionTableViewEditActionThe edit action.
uneditedValueobjectThe unedited value of the cell.
GenerateEditingElement(TableViewCell, object?)
Generates an editing element for the cell.
public abstract FrameworkElement GenerateEditingElement(TableViewCell cell, object? dataItem)
Parameters
cellTableViewCellThe cell for which the editing element is generated.
dataItemobjectThe data item associated with the cell.
Returns
- FrameworkElement
A FrameworkElement representing the editing element.
GenerateElement(TableViewCell, object?)
Generates a display element for the cell.
public abstract FrameworkElement GenerateElement(TableViewCell cell, object? dataItem)
Parameters
cellTableViewCellThe cell for which the element is generated.
dataItemobjectThe data item associated with the cell.
Returns
- FrameworkElement
A FrameworkElement representing the display element.
GetCellContent(object?)
Gets the content of the cell for the specified data item.
public virtual object? GetCellContent(object? dataItem)
Parameters
dataItemobjectThe data item.
Returns
- object
The content of the cell.
GetClipboardContent(object?)
Gets the clipboard content of the cell for the specified data item.
public virtual object? GetClipboardContent(object? dataItem)
Parameters
dataItemobjectThe data item.
Returns
- object
The clipboard content of the cell.
PrepareCellForEdit(TableViewCell, RoutedEventArgs)
Called to prepare the cell for editing.
protected virtual object? PrepareCellForEdit(TableViewCell cell, RoutedEventArgs routedEvent)
Parameters
cellTableViewCellThe cell to prepare for editing.
routedEventRoutedEventArgsThe routed event.
Returns
- object
Should return the unedited cell value.
RefreshElement(TableViewCell, object?)
Refreshes the display element for the cell.
public virtual void RefreshElement(TableViewCell cell, object? dataItem)
Parameters
cellTableViewCellThe cell for which the element is refreshed.
dataItemobjectThe data item associated with the cell.
SetClipboardContent(object?, object?)
Sets the content from the clipboard to the specified data item.
public virtual bool SetClipboardContent(object? dataItem, object? value)
Parameters
dataItemobjectThe data item.
valueobjectThe value to set.
Returns
UpdateElementState(TableViewCell, object?)
Updates the state of the element for the cell.
public virtual void UpdateElementState(TableViewCell cell, object? dataItem)
Parameters
cellTableViewCellThe cell for which the element state is updated.
dataItemobjectThe data item associated with the cell.