Skip to main content

IColumn Interface

Definition

Assembly:Avalonia.Controls.TreeDataGrid
Package:Avalonia.Controls.TreeDataGrid

Represents a column in an Avalonia.Controls.ITreeDataGridSource.

public interface IColumn

Implements: INotifyPropertyChanged

Properties

NameDescription
ActualWidthGets the actual width of the column after measurement.
CanUserResizeGets a value indicating whether the user can resize the column.
HeaderGets the column header.
IsVisibleGets or sets a value indicating whether the column is visible.
SortDirectionGets or sets the sort direction indicator that will be displayed on the column.
TagGets or sets a user-defined object attached to the column.
WidthGets the width of the column.

ActualWidth Property

Gets the actual width of the column after measurement.

public double ActualWidth { get; set; }

Returns

The width of the column in pixels, or NaN if the column has not yet been laid out.

CanUserResize Property

Gets a value indicating whether the user can resize the column.

public Nullable<bool> CanUserResize { get; set; }

Header Property

Gets the column header.

public object Header { get; set; }

IsVisible Property

Gets or sets a value indicating whether the column is visible.

public bool IsVisible { get; set; }

Remarks

When set to false, the column header and cells will not be rendered and the column will not contribute to layout calculations.

SortDirection Property

Gets or sets the sort direction indicator that will be displayed on the column.

public Nullable<System.ComponentModel.ListSortDirection> SortDirection { get; set; }

Remarks

Note that changing this property does not change the sorting of the data, it is only used to display a sort direction indicator. To sort data according to a column use Avalonia.Controls.ITreeDataGridSource.SortBy(Avalonia.Controls.Models.TreeDataGrid.IColumn,System.ComponentModel.ListSortDirection).

Tag Property

Gets or sets a user-defined object attached to the column.

public object Tag { get; set; }

Width Property

Gets the width of the column.

public Avalonia.Controls.GridLength Width { get; set; }

Remarks

To set the column width use Avalonia.Controls.Models.TreeDataGrid.IColumns.SetColumnWidth(int,Avalonia.Controls.GridLength).