Table of Contents

Class TableView

Namespace
WinUI.TableView
Assembly
WinUI.TableView.dll

Partial class for TableView that provides UI Automation support.

[StyleTypedProperty(Property = "ColumnHeaderStyle", StyleTargetType = typeof(TableViewColumnHeader))]
[StyleTypedProperty(Property = "CellStyle", StyleTargetType = typeof(TableViewCell))]
[WinRTRuntimeClassName("Microsoft.UI.Xaml.IUIElementOverrides")]
[WinRTExposedType(typeof(WinUI_TableView_TableViewWinRTTypeDetails))]
public class TableView : ListView, IWinRTObject
Inheritance
object
DependencyObject
UIElement
FrameworkElement
Control
ItemsControl
Selector
ListViewBase
ListView
TableView
Implements
IWinRTObject

Constructors

TableView()

Initializes a new instance of the TableView class.

public TableView()

Fields

AlternateRowBackgroundProperty

Identifies the AlternateRowBackground dependency property.

public static readonly DependencyProperty AlternateRowBackgroundProperty

Field Value

DependencyProperty

AlternateRowForegroundProperty

Identifies the AlternateRowForeground dependency property.

public static readonly DependencyProperty AlternateRowForegroundProperty

Field Value

DependencyProperty

AreRowDetailsFrozenProperty

Identifies the AreRowDetailsFrozen dependency property.

public static readonly DependencyProperty AreRowDetailsFrozenProperty

Field Value

DependencyProperty

AutoGenerateColumnsProperty

Identifies the AutoGenerateColumns dependency property.

public static readonly DependencyProperty AutoGenerateColumnsProperty

Field Value

DependencyProperty

CanCopyProperty

Identifies the CanCopy dependency property.

public static readonly DependencyProperty CanCopyProperty

Field Value

DependencyProperty

CanFilterColumnsProperty

Identifies the CanFilterColumns dependency property.

public static readonly DependencyProperty CanFilterColumnsProperty

Field Value

DependencyProperty

CanPasteProperty

Identifies the CanPaste dependency property.

public static readonly DependencyProperty CanPasteProperty

Field Value

DependencyProperty

CanReorderColumnsProperty

Identifies the CanReorderColumns dependency property.

public static readonly DependencyProperty CanReorderColumnsProperty

Field Value

DependencyProperty

CanResizeColumnsProperty

Identifies the CanResizeColumns dependency property.

public static readonly DependencyProperty CanResizeColumnsProperty

Field Value

DependencyProperty

CanSortColumnsProperty

Identifies the CanSortColumns dependency property.

public static readonly DependencyProperty CanSortColumnsProperty

Field Value

DependencyProperty

CellContextFlyoutProperty

Identifies the CellContextFlyout dependency property.

public static readonly DependencyProperty CellContextFlyoutProperty

Field Value

DependencyProperty

CellStyleProperty

Identifies the CellStyle dependency property.

public static readonly DependencyProperty CellStyleProperty

Field Value

DependencyProperty

CellsHorizontalOffsetProperty

Identifies the CellsVerticalOffset dependency property.

public static readonly DependencyProperty CellsHorizontalOffsetProperty

Field Value

DependencyProperty

ColumnAutoWidthModeProperty

Identifies the ColumnAutoWidthMode dependency property.

public static readonly DependencyProperty ColumnAutoWidthModeProperty

Field Value

DependencyProperty

ColumnHeaderStyleProperty

Identifies the ColumnHeaderStyle dependency property.

public static readonly DependencyProperty ColumnHeaderStyleProperty

Field Value

DependencyProperty

ConditionalCellStylesProperty

Identifies the ConditionalCellStyles dependency property.

public static readonly DependencyProperty ConditionalCellStylesProperty

Field Value

DependencyProperty

CornerButtonModeProperty

Identifies the CornerButtonMode dependency property.

public static readonly DependencyProperty CornerButtonModeProperty

Field Value

DependencyProperty

CurrentCellSlotProperty

Identifies the CurrentCellSlot dependency property.

public static readonly DependencyProperty CurrentCellSlotProperty

Field Value

DependencyProperty

ForceRowOrCellSelectionOnContextRequestedProperty

Identifies the ForceRowOrCellSelectionOnContextRequested dependency property.

public static readonly DependencyProperty ForceRowOrCellSelectionOnContextRequestedProperty

Field Value

DependencyProperty

FrozenColumnCountProperty

Identifies the FrozenColumnCount dependency property.

public static readonly DependencyProperty FrozenColumnCountProperty

Field Value

DependencyProperty

GridLinesVisibilityProperty

Identifies the GridLinesVisibility dependency property.

public static readonly DependencyProperty GridLinesVisibilityProperty

Field Value

DependencyProperty

HeaderGridLinesVisibilityProperty

Identifies the HeaderGridLinesVisibility dependency property.

public static readonly DependencyProperty HeaderGridLinesVisibilityProperty

Field Value

DependencyProperty

HeaderRowHeightProperty

Identifies the HeaderRowHeight dependency property.

public static readonly DependencyProperty HeaderRowHeightProperty

Field Value

DependencyProperty

HeaderRowMaxHeightProperty

Identifies the HeaderRowMaxHeight dependency property.

public static readonly DependencyProperty HeaderRowMaxHeightProperty

Field Value

DependencyProperty

HeaderRowMinHeightProperty

Identifies the HeaderRowMinHeight dependency property.

public static readonly DependencyProperty HeaderRowMinHeightProperty

Field Value

DependencyProperty

HeadersVisibilityProperty

Identifies the HeadersVisibility dependency property.

public static readonly DependencyProperty HeadersVisibilityProperty

Field Value

DependencyProperty

HorizontalGridLinesStrokeProperty

Identifies the HorizontalGridLinesStroke dependency property.

public static readonly DependencyProperty HorizontalGridLinesStrokeProperty

Field Value

DependencyProperty

HorizontalGridLinesStrokeThicknessProperty

Identifies the HorizontalGridLinesStrokeThickness dependency property.

public static readonly DependencyProperty HorizontalGridLinesStrokeThicknessProperty

Field Value

DependencyProperty

HorizontalOffsetProperty

Identifies the HorizontalOffset dependency property.

public static readonly DependencyProperty HorizontalOffsetProperty

Field Value

DependencyProperty

IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

public static readonly DependencyProperty IsReadOnlyProperty

Field Value

DependencyProperty

ItemsSourceProperty

Identifies the ItemsSource dependency property.

public static readonly DependencyProperty ItemsSourceProperty

Field Value

DependencyProperty

MaxColumnWidthProperty

Identifies the MaxColumnWidth dependency property.

public static readonly DependencyProperty MaxColumnWidthProperty

Field Value

DependencyProperty

MinColumnWidthProperty

Identifies the MinColumnWidth dependency property.

public static readonly DependencyProperty MinColumnWidthProperty

Field Value

DependencyProperty

RowContextFlyoutProperty

Identifies the RowContextFlyout dependency property.

public static readonly DependencyProperty RowContextFlyoutProperty

Field Value

DependencyProperty

RowDetailsTemplateProperty

Identifies the RowDetailsTemplate dependency property.

public static readonly DependencyProperty RowDetailsTemplateProperty

Field Value

DependencyProperty

RowDetailsTemplateSelectorProperty

Identifies the RowDetailsTemplateSelector dependency property.

public static readonly DependencyProperty RowDetailsTemplateSelectorProperty

Field Value

DependencyProperty

RowDetailsVisibilityModeProperty

Identifies the RowDetailsVisibilityMode dependency property.

public static readonly DependencyProperty RowDetailsVisibilityModeProperty

Field Value

DependencyProperty

RowHeaderActualWidthProperty

Identifies the RowHeaderActualWidth dependency property.

public static readonly DependencyProperty RowHeaderActualWidthProperty

Field Value

DependencyProperty

RowHeaderMaxWidthProperty

Identifies the RowHeaderMaxWidth dependency property.

public static readonly DependencyProperty RowHeaderMaxWidthProperty

Field Value

DependencyProperty

RowHeaderMinWidthProperty

Identifies the RowHeaderMinWidth dependency property.

public static readonly DependencyProperty RowHeaderMinWidthProperty

Field Value

DependencyProperty

RowHeaderTemplateProperty

Identifies the RowHeaderContent dependency property.

public static readonly DependencyProperty RowHeaderTemplateProperty

Field Value

DependencyProperty

RowHeaderTemplateSelectorProperty

Identifies the RowHeaderTemplateSelector dependency property.

public static readonly DependencyProperty RowHeaderTemplateSelectorProperty

Field Value

DependencyProperty

RowHeaderWidthProperty

Identifies the RowHeaderWidth dependency property.

public static readonly DependencyProperty RowHeaderWidthProperty

Field Value

DependencyProperty

RowHeightProperty

Identifies the RowHeight dependency property.

public static readonly DependencyProperty RowHeightProperty

Field Value

DependencyProperty

RowMaxHeightProperty

Identifies the RowMaxHeight dependency property.

public static readonly DependencyProperty RowMaxHeightProperty

Field Value

DependencyProperty

RowMinHeightProperty

Identifies the RowMinHeight dependency property.

public static readonly DependencyProperty RowMinHeightProperty

Field Value

DependencyProperty

SelectionModeProperty

Identifies the SelectionMode dependency property.

public static readonly DependencyProperty SelectionModeProperty

Field Value

DependencyProperty

SelectionUnitProperty

Identifies the SelectionUnit dependency property.

public static readonly DependencyProperty SelectionUnitProperty

Field Value

DependencyProperty

ShowDragRectangleProperty

Identifies the ShowDragRectangle dependency property.

public static readonly DependencyProperty ShowDragRectangleProperty

Field Value

DependencyProperty

ShowExportOptionsProperty

Identifies the ShowExportOptions dependency property.

public static readonly DependencyProperty ShowExportOptionsProperty

Field Value

DependencyProperty

ShowFilterItemsCountProperty

Identifies the ShowFilterItemsCount dependency property.

public static readonly DependencyProperty ShowFilterItemsCountProperty

Field Value

DependencyProperty

UseRightClickForColumnFilterProperty

Identifies the UseRightClickForColumnFilter dependency property.

public static readonly DependencyProperty UseRightClickForColumnFilterProperty

Field Value

DependencyProperty

VerticalGridLinesStrokeProperty

Identifies the VerticalGridLinesStroke dependency property.

public static readonly DependencyProperty VerticalGridLinesStrokeProperty

Field Value

DependencyProperty

VerticalGridLinesStrokeThicknessProperty

Identifies the VerticalGridLinesStrokeThickness dependency property.

public static readonly DependencyProperty VerticalGridLinesStrokeThicknessProperty

Field Value

DependencyProperty

VerticalOffsetProperty

Identifies the VerticalOffset dependency property.

public static readonly DependencyProperty VerticalOffsetProperty

Field Value

DependencyProperty

Properties

AllowLiveShaping

Gets or sets a value indicating whether live shaping is enabled.

public bool AllowLiveShaping { get; set; }

Property Value

bool

AlternateRowBackground

Gets or sets the background brush for alternate rows.

public Brush AlternateRowBackground { get; set; }

Property Value

Brush

AlternateRowForeground

Gets or sets the foreground brush for alternate rows.

public Brush AlternateRowForeground { get; set; }

Property Value

Brush

AreRowDetailsFrozen

Gets or sets a value indicating whether the row details are frozen during horizontal scrolling.

public bool AreRowDetailsFrozen { get; set; }

Property Value

bool

AutoGenerateColumns

Gets or sets a value indicating whether to auto-generate columns.

public bool AutoGenerateColumns { get; set; }

Property Value

bool

CanCopy

Gets or sets a value that indicates whether users can copy selected cells or rows to the clipboard.

public bool CanCopy { get; set; }

Property Value

bool

CanFilterColumns

Gets or sets a value indicating whether columns can be filtered. This will overridden by the individual column.

public bool CanFilterColumns { get; set; }

Property Value

bool

CanPaste

Gets or sets a value that indicates whether users can paste clipboard data into the TableView.

public bool CanPaste { get; set; }

Property Value

bool

CanReorderColumns

Gets or sets a value indicating whether columns can be reordered by dragging headers.

public bool CanReorderColumns { get; set; }

Property Value

bool

CanResizeColumns

Gets or sets a value indicating whether columns can be resized. This will override what is set on individual column.

public bool CanResizeColumns { get; set; }

Property Value

bool

CanSortColumns

Gets or sets a value indicating whether columns can be sorted. This will overridden by individual column.

public bool CanSortColumns { get; set; }

Property Value

bool

CellContextFlyout

Gets or sets the context flyout for cells.

public FlyoutBase? CellContextFlyout { get; set; }

Property Value

FlyoutBase

CellStyle

Gets or sets the style applied to all cells.

public Style CellStyle { get; set; }

Property Value

Style

CellsHorizontalOffset

Gets or sets the horizontal offset for the cells.

public double CellsHorizontalOffset { get; }

Property Value

double

CollectionView

Gets the collection view associated with the TableView.

public ICollectionView CollectionView { get; }

Property Value

ICollectionView

ColumnAutoWidthMode

Gets or sets the ColumnAutoWidthMode for all columns.

public TableViewColumnAutoWidthMode ColumnAutoWidthMode { get; set; }

Property Value

TableViewColumnAutoWidthMode

ColumnHeaderStyle

Gets or sets the style applied to all column headers.

public Style ColumnHeaderStyle { get; set; }

Property Value

Style

Columns

Gets the collection of columns in the TableView.

public ITableViewColumnsCollection Columns { get; }

Property Value

ITableViewColumnsCollection

ConditionalCellStyles

Gets or sets the collection of conditional cell styles.

public IList<TableViewConditionalCellStyle> ConditionalCellStyles { get; set; }

Property Value

IList<TableViewConditionalCellStyle>

CornerButtonMode

Gets or sets the mode of the corner button.

public TableViewCornerButtonMode CornerButtonMode { get; set; }

Property Value

TableViewCornerButtonMode

CurrentCellSlot

Gets or sets the current cell slot associated with the table view.

public TableViewCellSlot? CurrentCellSlot { get; set; }

Property Value

TableViewCellSlot?

FilterDescriptions

Gets the collection of filter descriptions applied to the items.

public IList<FilterDescription> FilterDescriptions { get; }

Property Value

IList<FilterDescription>

FilterHandler

Gets or sets the filter handler for the TableView.

public IColumnFilterHandler FilterHandler { get; set; }

Property Value

IColumnFilterHandler

ForceRowOrCellSelectionOnContextRequested

Gets or sets a value that indicates whether the TableView should force select the Row or Cell depending on the SelectionUnit

public bool ForceRowOrCellSelectionOnContextRequested { get; set; }

Property Value

bool

FrozenColumnCount

Gets or sets the number of columns that stays in view on horizontal scroll.

public int FrozenColumnCount { get; set; }

Property Value

int

GridLinesVisibility

Gets or sets the visibility of grid lines in the body rows.

public TableViewGridLinesVisibility GridLinesVisibility { get; set; }

Property Value

TableViewGridLinesVisibility

HeaderGridLinesVisibility

Gets or sets the visibility of grid lines in the header row.

public TableViewGridLinesVisibility HeaderGridLinesVisibility { get; set; }

Property Value

TableViewGridLinesVisibility

HeaderRowHeight

Gets or sets the height of the header row.

public double HeaderRowHeight { get; set; }

Property Value

double

HeaderRowMaxHeight

Gets or sets the max height of the header row.

public double HeaderRowMaxHeight { get; set; }

Property Value

double

HeaderRowMinHeight

Gets or sets the min height of the header row.

public double HeaderRowMinHeight { get; set; }

Property Value

double

HeadersVisibility

Gets or sets the visibility of the row and column headers.

public TableViewHeadersVisibility HeadersVisibility { get; set; }

Property Value

TableViewHeadersVisibility

HorizontalGridLinesStroke

Gets or sets the brush used to draw horizontal grid lines.

public Brush HorizontalGridLinesStroke { get; set; }

Property Value

Brush

HorizontalGridLinesStrokeThickness

Gets or sets the thickness of horizontal grid lines.

public double HorizontalGridLinesStrokeThickness { get; set; }

Property Value

double

HorizontalOffset

Gets the horizontal offset for the TableView.

public double HorizontalOffset { get; }

Property Value

double

IsFiltered

Gets a value indicating whether the TableView items are filtered.

public bool IsFiltered { get; }

Property Value

bool

IsReadOnly

Gets or sets a value indicating whether the TableView is read-only. This will override what is set on individual column.

public bool IsReadOnly { get; set; }

Property Value

bool

IsSorted

Gets a value indicating whether the TableView items are sorted.

public bool IsSorted { get; }

Property Value

bool

ItemsSource

Gets or sets an object source used to generate the content of the TableView.

public object? ItemsSource { get; set; }

Property Value

object

MaxColumnWidth

Gets or sets the maximum width of columns. This can be override by setting MaxWidth on individual column.

public double MaxColumnWidth { get; set; }

Property Value

double

MinColumnWidth

Gets or sets the minimum width of columns. This can be overridden by the individual column.

public double MinColumnWidth { get; set; }

Property Value

double

RowContextFlyout

Gets or sets the context flyout for rows.

public FlyoutBase? RowContextFlyout { get; set; }

Property Value

FlyoutBase

RowDetailsTemplate

Gets or sets the data template for the row details.

public DataTemplate? RowDetailsTemplate { get; set; }

Property Value

DataTemplate

RowDetailsTemplateSelector

Gets or sets the data template selector for the row details.

public DataTemplateSelector? RowDetailsTemplateSelector { get; set; }

Property Value

DataTemplateSelector

RowDetailsVisibilityMode

Gets or sets the visibility mode of the row details.

public TableViewRowDetailsVisibilityMode RowDetailsVisibilityMode { get; set; }

Property Value

TableViewRowDetailsVisibilityMode

RowHeaderActualWidth

Gets the actual width of the row header.

public double RowHeaderActualWidth { get; }

Property Value

double

RowHeaderMaxWidth

Gets or sets the maximum width of the row header.

public double RowHeaderMaxWidth { get; set; }

Property Value

double

RowHeaderMinWidth

Gets or sets the minimum width of the row header.

public double RowHeaderMinWidth { get; set; }

Property Value

double

RowHeaderTemplate

Gets or sets the data template for the row header.

public DataTemplate? RowHeaderTemplate { get; set; }

Property Value

DataTemplate

RowHeaderTemplateSelector

Gets or sets the data template selector for the row header.

public DataTemplateSelector? RowHeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector

RowHeaderWidth

Gets or sets the width of the row header.

public double RowHeaderWidth { get; set; }

Property Value

double

RowHeight

Gets or sets the height of the rows.

public double RowHeight { get; set; }

Property Value

double

RowMaxHeight

Gets or sets the maximum height of the rows.

public double RowMaxHeight { get; set; }

Property Value

double

RowMinHeight

Gets or sets the minimum height of the rows.

public double RowMinHeight { get; set; }

Property Value

double

SelectionMode

Gets or sets the selection mode for the TableView.

public ListViewSelectionMode SelectionMode { get; set; }

Property Value

ListViewSelectionMode

SelectionUnit

Gets or sets the selection unit for the TableView.

public TableViewSelectionUnit SelectionUnit { get; set; }

Property Value

TableViewSelectionUnit

ShowDragRectangle

Gets or sets a value indicating whether the drag selection rectangle is shown during cell drag selection.

public bool ShowDragRectangle { get; set; }

Property Value

bool

ShowExportOptions

Gets or sets a value indicating whether to show export options.

public bool ShowExportOptions { get; set; }

Property Value

bool

ShowFilterItemsCount

Gets or sets a value that indicates whether the TableView displays items count next to each filter item in filter flyout.

public bool ShowFilterItemsCount { get; set; }

Property Value

bool

SortDescriptions

Gets the collection of sort descriptions applied to the items.

public IList<SortDescription> SortDescriptions { get; }

Property Value

IList<SortDescription>

UseRightClickForColumnFilter

Gets or sets a value indicating whether opening the column filter over header right-click is enabled.

public bool UseRightClickForColumnFilter { get; set; }

Property Value

bool

VerticalGridLinesStroke

Gets or sets the brush used to draw vertical grid lines.

public Brush VerticalGridLinesStroke { get; set; }

Property Value

Brush

VerticalGridLinesStrokeThickness

Gets or sets the thickness of vertical grid lines.

public double VerticalGridLinesStrokeThickness { get; set; }

Property Value

double

VerticalOffset

Gets the vertical offset for the TableView.

public double VerticalOffset { get; }

Property Value

double

Methods

ClearAllFilters()

Clears all filters applied to the items.

public void ClearAllFilters()

ClearAllSorting()

Clears all sorting applied to the items.

public void ClearAllSorting()

ClearContainerForItemOverride(DependencyObject, object)

Undoes the effects of the PrepareContainerForItemOverride method.

protected override void ClearContainerForItemOverride(DependencyObject element, object item)

Parameters

element DependencyObject

The container element.

item object

The item.

DeselectAll()

Deselects all rows or cells in the TableView.

public void DeselectAll()

GetAllContent(bool, char)

Returns all the cells' content as a string, optionally including headers, with values separated by the given character.

public string GetAllContent(bool includeHeaders, char separator = '\t')

Parameters

includeHeaders bool

Whether to include headers in the output.

separator char

The character used to separate cell values (default is tab).

Returns

string

A string of all cell content separated by the specified character.

GetCellsContent(IEnumerable<TableViewCellSlot>, bool, char)

Returns specified cells' content as a string, optionally including headers, with values separated by the given character.

public string GetCellsContent(IEnumerable<TableViewCellSlot> slots, bool includeHeaders, char separator = '\t')

Parameters

slots IEnumerable<TableViewCellSlot>

Cell slots to get content for.

includeHeaders bool

Whether to include headers in the output.

separator char

The character used to separate cell values.

Returns

string

A string of specified cell content separated by the specified character.

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject

The element that is used to display the given item.

GetRowsContent(int[], bool, char)

Returns specified rows' content as a string, optionally including headers, with values separated by the given character.

public string GetRowsContent(int[] rows, bool includeHeaders, char separator = '\t')

Parameters

rows int[]

Row indexes to get content for.

includeHeaders bool

Whether to include headers in the output.

separator char

The character used to separate cell values.

Returns

string

A string of specified row content separated by the specified character.

GetSelectedClipboardContent(bool, char)

Returns the selected cells' or rows' clipboard content as a string, optionally including headers, with values separated by the given character.

public string GetSelectedClipboardContent(bool includeHeaders, char separator = '\t')

Parameters

includeHeaders bool

Whether to include headers in the output.

separator char

The character used to separate cell values (default is tab).

Returns

string

A string of selected cell clipboard content separated by the specified character.

GetSelectedContent(bool, char)

Returns the selected cells' or rows' content as a string, optionally including headers, with values separated by the given character.

public string GetSelectedContent(bool includeHeaders, char separator = '\t')

Parameters

includeHeaders bool

Whether to include headers in the output.

separator char

The character used to separate cell values (default is tab).

Returns

string

A string of selected cell content separated by the specified character.

OnApplyTemplate()

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.

protected override void OnApplyTemplate()

OnAutoGeneratingColumn(TableViewAutoGeneratingColumnEventArgs)

Called before the AutoGeneratingColumn event occurs.

protected virtual void OnAutoGeneratingColumn(TableViewAutoGeneratingColumnEventArgs args)

Parameters

args TableViewAutoGeneratingColumnEventArgs

Cancelable event args.

OnBeginningEdit(TableViewBeginningEditEventArgs)

Called before the BeginningEdit event occurs.

protected virtual void OnBeginningEdit(TableViewBeginningEditEventArgs args)

Parameters

args TableViewBeginningEditEventArgs

Cancelable event args.

OnCellContextFlyoutOpening(TableViewCellContextFlyoutEventArgs)

Called before the CellContextFlyoutOpening event occurs.

protected virtual void OnCellContextFlyoutOpening(TableViewCellContextFlyoutEventArgs args)

Parameters

args TableViewCellContextFlyoutEventArgs

Handleable event args.

OnCellDoubleTapped(TableViewCellDoubleTappedEventArgs)

Called before the CellDoubleTapped event occurs.

protected virtual void OnCellDoubleTapped(TableViewCellDoubleTappedEventArgs args)

Parameters

args TableViewCellDoubleTappedEventArgs

The event data.

OnCellEditEnded(TableViewCellEditEndedEventArgs)

Called before the CellEditEnded event occurs.

protected virtual void OnCellEditEnded(TableViewCellEditEndedEventArgs args)

Parameters

args TableViewCellEditEndedEventArgs

Event args.

OnCellEditEnding(TableViewCellEditEndingEventArgs)

Called before the CellEditEnding event occurs.

protected virtual void OnCellEditEnding(TableViewCellEditEndingEventArgs args)

Parameters

args TableViewCellEditEndingEventArgs

Cancelable event args.

OnCellSelectionChanged(TableViewCellSelectionChangedEventArgs)

Called before the CellSelectionChanged event occurs.

protected virtual void OnCellSelectionChanged(TableViewCellSelectionChangedEventArgs args)

Parameters

args TableViewCellSelectionChangedEventArgs

OnClearSorting(TableViewClearSortingEventArgs)

Called before the ClearSorting event occurs.

protected virtual void OnClearSorting(TableViewClearSortingEventArgs args)

Parameters

args TableViewClearSortingEventArgs

The event data.

OnColumnReordered(TableViewColumnReorderedEventArgs)

Called before the ColumnReordered event occurs.

protected virtual void OnColumnReordered(TableViewColumnReorderedEventArgs args)

Parameters

args TableViewColumnReorderedEventArgs

The event arguments.

OnColumnReordering(TableViewColumnReorderingEventArgs)

Called before the ColumnReordering event occurs.

protected virtual void OnColumnReordering(TableViewColumnReorderingEventArgs args)

Parameters

args TableViewColumnReorderingEventArgs

The event arguments.

OnCopyToClipboard(TableViewCopyToClipboardEventArgs)

Called before the CopyToClipboard event occurs.

protected virtual void OnCopyToClipboard(TableViewCopyToClipboardEventArgs args)

Parameters

args TableViewCopyToClipboardEventArgs

Handleable event args.

OnCreateAutomationPeer()

When implemented in a derived class, returns class-specific AutomationPeer implementations for the Microsoft UI Automation infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The class-specific AutomationPeer subclass to return.

OnCurrentCellChanged(DependencyPropertyChangedEventArgs)

Called before the CurrentCellChanged event occurs.

protected virtual void OnCurrentCellChanged(DependencyPropertyChangedEventArgs args)

Parameters

args DependencyPropertyChangedEventArgs

OnExportAllContent(TableViewExportContentEventArgs)

Called before the ExportAllContent event occurs.

protected virtual void OnExportAllContent(TableViewExportContentEventArgs args)

Parameters

args TableViewExportContentEventArgs

Handleable event args.

OnExportSelectedContent(TableViewExportContentEventArgs)

Called before the ExportSelectedContent event occurs.

protected virtual void OnExportSelectedContent(TableViewExportContentEventArgs args)

Parameters

args TableViewExportContentEventArgs

Handleable event args.

OnIsReadOnlyChanged(DependencyPropertyChangedEventArgs)

Called before the IsReadOnlyChanged event occurs.

protected virtual void OnIsReadOnlyChanged(DependencyPropertyChangedEventArgs args)

Parameters

args DependencyPropertyChangedEventArgs

OnKeyDown(KeyRoutedEventArgs)

Called before the KeyDown event occurs.

protected override void OnKeyDown(KeyRoutedEventArgs e)

Parameters

e KeyRoutedEventArgs

The data for the event.

OnPasteFromClipboard(TableViewPasteFromClipboardEventArgs)

Called before the PasteFromClipboard event occurs.

protected virtual void OnPasteFromClipboard(TableViewPasteFromClipboardEventArgs args)

Parameters

args TableViewPasteFromClipboardEventArgs

Handleable event args.

OnPreparingCellForEdit(TableViewPreparingCellForEditEventArgs)

Called before the PreparingCellForEdit event occurs.

protected virtual void OnPreparingCellForEdit(TableViewPreparingCellForEditEventArgs args)

Parameters

args TableViewPreparingCellForEditEventArgs

Event args.

OnRowContextFlyoutOpening(TableViewRowContextFlyoutEventArgs)

Called before the RowContextFlyoutOpening event occurs.

protected virtual void OnRowContextFlyoutOpening(TableViewRowContextFlyoutEventArgs args)

Parameters

args TableViewRowContextFlyoutEventArgs

Handleable event args.

OnRowDoubleTapped(TableViewRowDoubleTappedEventArgs)

Called before the RowDoubleTapped event occurs.

protected virtual void OnRowDoubleTapped(TableViewRowDoubleTappedEventArgs args)

Parameters

args TableViewRowDoubleTappedEventArgs

The event data.

OnSorting(TableViewSortingEventArgs)

Called before the Sorting event occurs.

protected virtual void OnSorting(TableViewSortingEventArgs args)

Parameters

args TableViewSortingEventArgs

Handleable event args.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)

Parameters

element DependencyObject

The element that's used to display the specified item.

item object

The item to display.

RefreshFilter()

Refreshes all applied filters.

public void RefreshFilter()

RefreshSorting()

Refreshes the sorting applied to the items in the TableView.

public void RefreshSorting()

RefreshView()

Refreshes the items view of the TableView.

public void RefreshView()

ScrollCellIntoView(TableViewCellSlot)

Scrolls the specified cell slot into view.

public Task<TableViewCell> ScrollCellIntoView(TableViewCellSlot slot)

Parameters

slot TableViewCellSlot

The cell slot to scroll into view.

Returns

Task<TableViewCell>

ScrollRowIntoView(int)

Scrolls the specified row into view.

public Task<TableViewRow?> ScrollRowIntoView(int index)

Parameters

index int

The index of the row to scroll into view.

Returns

Task<TableViewRow>

Events

AutoGeneratingColumn

Event triggered when a column is auto-generating.

public event EventHandler<TableViewAutoGeneratingColumnEventArgs>? AutoGeneratingColumn

Event Type

EventHandler<TableViewAutoGeneratingColumnEventArgs>

BeginningEdit

Occurs before a cell enters edit mode and allows the edit operation to be canceled.

public event EventHandler<TableViewBeginningEditEventArgs>? BeginningEdit

Event Type

EventHandler<TableViewBeginningEditEventArgs>

CellContextFlyoutOpening

Event triggered when the cell context flyout is opening.

public event EventHandler<TableViewCellContextFlyoutEventArgs>? CellContextFlyoutOpening

Event Type

EventHandler<TableViewCellContextFlyoutEventArgs>

CellDoubleTapped

Event triggered when a cell is double-tapped.

public event EventHandler<TableViewCellDoubleTappedEventArgs>? CellDoubleTapped

Event Type

EventHandler<TableViewCellDoubleTappedEventArgs>

CellEditEnded

Occurs after a cell edit has been committed or canceled.

public event EventHandler<TableViewCellEditEndedEventArgs>? CellEditEnded

Event Type

EventHandler<TableViewCellEditEndedEventArgs>

CellEditEnding

Occurs just before a cell edit is committed or canceled, and allows the action to be canceled.

public event EventHandler<TableViewCellEditEndingEventArgs>? CellEditEnding

Event Type

EventHandler<TableViewCellEditEndingEventArgs>

CellSelectionChanged

Event triggered when selected cells change.

public event EventHandler<TableViewCellSelectionChangedEventArgs>? CellSelectionChanged

Event Type

EventHandler<TableViewCellSelectionChangedEventArgs>

ClearSorting

Occurs when sorting is cleared from a column in the TableView.

public event EventHandler<TableViewClearSortingEventArgs>? ClearSorting

Event Type

EventHandler<TableViewClearSortingEventArgs>

ColumnReordered

Occurs after a column has been reordered.

public event EventHandler<TableViewColumnReorderedEventArgs>? ColumnReordered

Event Type

EventHandler<TableViewColumnReorderedEventArgs>

ColumnReordering

Occurs before a column is reordered.

public event EventHandler<TableViewColumnReorderingEventArgs>? ColumnReordering

Event Type

EventHandler<TableViewColumnReorderingEventArgs>

CopyToClipboard

Event triggered when copying selected rows or cell content to the clipboard.

public event EventHandler<TableViewCopyToClipboardEventArgs>? CopyToClipboard

Event Type

EventHandler<TableViewCopyToClipboardEventArgs>

CurrentCellChanged

Event triggered when the current cell changes.

public event DependencyPropertyChangedEventHandler? CurrentCellChanged

Event Type

DependencyPropertyChangedEventHandler

ExportAllContent

Event triggered when exporting all rows content.

public event EventHandler<TableViewExportContentEventArgs>? ExportAllContent

Event Type

EventHandler<TableViewExportContentEventArgs>

ExportSelectedContent

Event triggered when exporting selected rows or cells content.

public event EventHandler<TableViewExportContentEventArgs>? ExportSelectedContent

Event Type

EventHandler<TableViewExportContentEventArgs>

IsReadOnlyChanged

Event triggered when the IsReadOnly property changes.

public event DependencyPropertyChangedEventHandler? IsReadOnlyChanged

Event Type

DependencyPropertyChangedEventHandler

PasteFromClipboard

Event triggered when pasting clipboard content into the TableView.

public event EventHandler<TableViewPasteFromClipboardEventArgs>? PasteFromClipboard

Event Type

EventHandler<TableViewPasteFromClipboardEventArgs>

PreparingCellForEdit

Occurs when a cell enters edit mode, after the editing element has been created.

public event EventHandler<TableViewPreparingCellForEditEventArgs>? PreparingCellForEdit

Event Type

EventHandler<TableViewPreparingCellForEditEventArgs>

RowContextFlyoutOpening

Event triggered when the row context flyout is opening.

public event EventHandler<TableViewRowContextFlyoutEventArgs>? RowContextFlyoutOpening

Event Type

EventHandler<TableViewRowContextFlyoutEventArgs>

RowDoubleTapped

Event triggered when a row is double-tapped.

public event EventHandler<TableViewRowDoubleTappedEventArgs>? RowDoubleTapped

Event Type

EventHandler<TableViewRowDoubleTappedEventArgs>

Sorting

Occurs when a sorting is being applied to a column in the TableView.

public event EventHandler<TableViewSortingEventArgs>? Sorting

Event Type

EventHandler<TableViewSortingEventArgs>