Table of Contents

Interface ITableViewColumnsCollection

Namespace
WinUI.TableView
Assembly
WinUI.TableView.dll

Represents a collection of columns in a TableView, providing functionality to manage and interact with the columns.

public interface ITableViewColumnsCollection

Remarks

This interface extends System.Collections.Generic.IList<T> to provide standard list operations for TableViewColumn objects. It also implements System.Collections.Specialized.INotifyCollectionChanged to notify subscribers of changes to the collection, such as additions or removals.

Properties

TableView

Gets or sets the TableView associated with the collection.

TableView? TableView { get; }

Property Value

TableView

Remarks

This property allows access to the TableView that owns this collection of columns.

VisibleColumns

Gets the list of visible TableViewColumns.

IList<TableViewColumn> VisibleColumns { get; }

Property Value

IList<TableViewColumn>

Remarks

The result is a list of columns that are currently visible in the table view, meaning their Visibility is set to Microsoft.UI.Xaml.Visibility.Visible. The result is also ordered by the Order property, allowing for a consistent display order of the columns.

Methods

Move(int, int)

Moves a column from one index to another within the collection.

void Move(int oldIndex, int newIndex)

Parameters

oldIndex int

The zero-based index of the column to move.

newIndex int

The zero-based index to move the column to.

Events

ColumnPropertyChanged

Occurs when a property of a column changes.

event EventHandler<TableViewColumnPropertyChangedEventArgs>? ColumnPropertyChanged

Event Type

EventHandler<TableViewColumnPropertyChangedEventArgs>

Remarks

This event is triggered to notify subscribers about changes to column properties, such as width, visibility, or other attributes. Handlers can use the TableViewColumnPropertyChangedEventArgs parameter to access details about the specific property that changed.