In This Article

TreeListViewColumn Class

Represents a column definition for a TreeListView control.

public class TreeListViewColumn : DependencyObject
Inheritance:
object object

Constructors

TreeListViewColumn()

Initializes an instance of the class.

public TreeListViewColumn()

Properties

ActualWidth

The actual width of the column.

public double ActualWidth { get; }

Property Value

double

AutoWidthMode

The TreeListViewColumnAutoWidthMode that specifies which column cells are used to calculate auto-width when Width is Auto.

public TreeListViewColumnAutoWidthMode AutoWidthMode { get; set; }

Property Value

TreeListViewColumnAutoWidthMode

CanReorder

Indicates whether the column can be reordered by the end user.

public bool? CanReorder { get; set; }

Property Value

bool?:

A nullable bool that indicates whether the column can be reordered by the end user.

Remarks

If set to null, the resolved value will use the global CanColumnsReorder setting.

CanResize

Indicates whether the column can be resized by the end user.

public bool? CanResize { get; set; }

Property Value

bool?:

A nullable bool that indicates whether the column can be resized by the end user.

Remarks

If set to null, the resolved value will use the global CanColumnsResize setting.

CanToggleVisibility

Indicates whether the column can have its visibility toggled by the end user.

public bool? CanToggleVisibility { get; set; }

Property Value

bool?:

A nullable bool that indicates whether the column can have its visibility toggled by the end user.

Remarks

If set to null, the resolved value will use the global CanColumnsToggleVisibility setting.

CellBorderThickness

The Thickness of the border around cells in this column.

public Thickness CellBorderThickness { get; set; }

Property Value

Thickness:

The default value is 0.

CellContainerStyle

The Style that defines the visual representation of the column's cells.

public Style? CellContainerStyle { get; set; }

Property Value

Style

CellHorizontalAlignment

The HorizontalAlignment of the cell content in this column.

public HorizontalAlignment CellHorizontalAlignment { get; set; }

Property Value

HorizontalAlignment:

The default value is Stretch.

CellPadding

The Thickness of the padding in cells in this column.

public Thickness CellPadding { get; set; }

Property Value

Thickness:

The default value is 7, 2.

CellTemplate

The DataTemplate that defines the visual representation of the column's cells.

public DataTemplate? CellTemplate { get; set; }

Property Value

DataTemplate

CellTemplateSelector

The DataTemplateSelector that selects which template to use for the column's cells.

public DataTemplateSelector? CellTemplateSelector { get; set; }

Property Value

DataTemplateSelector

CellVerticalAlignment

The VerticalAlignment of the cell content in this column.

public VerticalAlignment CellVerticalAlignment { get; set; }

Property Value

VerticalAlignment:

The default value is Center.

ClipX

The clip x-location.

public double ClipX { get; }

Property Value

double

DisplayMemberBinding

The data item to bind to for this column.

public BindingBase? DisplayMemberBinding { get; set; }

Property Value

BindingBase

Header

The column header content.

public object? Header { get; set; }

Property Value

object

HeaderCellBorderThickness

The Thickness of the border around the header cell in this column.

public Thickness HeaderCellBorderThickness { get; set; }

Property Value

Thickness:

The default value is 0, 0, 1, 1.

HeaderCellPadding

The Thickness of the padding in the header cell in this column.

public Thickness HeaderCellPadding { get; set; }

Property Value

Thickness:

The default value is 7, 2.

HeaderContainerStyle

The Style to use for the column header container.

public Style? HeaderContainerStyle { get; set; }

Property Value

Style

HeaderHorizontalAlignment

The HorizontalAlignment of the column header content.

public HorizontalAlignment HeaderHorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

HeaderTemplate

The DataTemplate that defines the visual representation of the column header.

public DataTemplate? HeaderTemplate { get; set; }

Property Value

DataTemplate

HeaderTemplateSelector

The DataTemplateSelector that selects which template to use for the column header.

public DataTemplateSelector? HeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Index

The index of the column within its owner control.

public int Index { get; }

Property Value

int

IsFrozen

Indicates whether the column is frozen.

public bool IsFrozen { get; }

Property Value

bool:

true if the column is frozen; otherwise, false. The default value is false.

IsResizeGripperEnabled

Indicates whether the column's resize gripper is enabled.

public bool IsResizeGripperEnabled { get; }

Property Value

bool:

true if the column's resize gripper is enabled; otherwise, false. The default value is true.

IsVisible

Indicates whether the column is visible.

public bool IsVisible { get; set; }

Property Value

bool:

true if the column is visible; otherwise, false. The default value is true.

MaxWidth

The maximum column width.

public double MaxWidth { get; set; }

Property Value

double:

The default value is NaN, meaning no maximum.

MinWidth

The minimum column width.

public double MinWidth { get; set; }

Property Value

double:

The default value is 30.0.

SizeToFitCommand

The ICommand that adjusts the width of the column to fit all of its contents.

public ICommand SizeToFitCommand { get; }

Property Value

ICommand

SortDirection

The column sort direction.

public ColumnSortDirection? SortDirection { get; set; }

Property Value

ColumnSortDirection?:

The default value is a null reference, meaning no sort.

Tag

Custom data for the column.

public object? Tag { get; set; }

Property Value

object

Title

The string title of the column, used in context menus and other secondary UI, but not visible within the column itself.

public string? Title { get; set; }

Property Value

string

ToggleVisibilityCommand

The ICommand that can be used to toggle the column's visibility.

public ICommand ToggleVisibilityCommand { get; }

Property Value

ICommand

Width

The column width.

public GridLength Width { get; set; }

Property Value

GridLength:

The default value is Auto.

Methods

SizeToFit()

Adjusts the width of the column to fit all of its contents.

public void SizeToFit()

Events

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler

Fields

AutoWidthModeProperty

Defines the AutoWidthMode property.

public static readonly DependencyProperty AutoWidthModeProperty

CanReorderProperty

Defines the CanReorder property.

public static readonly DependencyProperty CanReorderProperty

CanResizeProperty

Defines the CanResize property.

public static readonly DependencyProperty CanResizeProperty

CanToggleVisibilityProperty

Defines the CanToggleVisibility property.

public static readonly DependencyProperty CanToggleVisibilityProperty

CellBorderThicknessProperty

Defines the CellBorderThickness property.

public static readonly DependencyProperty CellBorderThicknessProperty

CellContainerStyleProperty

Defines the CellContainerStyle property.

public static readonly DependencyProperty CellContainerStyleProperty

CellHorizontalAlignmentProperty

Defines the CellHorizontalAlignment property.

public static readonly DependencyProperty CellHorizontalAlignmentProperty

CellPaddingProperty

Defines the CellPadding property.

public static readonly DependencyProperty CellPaddingProperty

CellTemplateProperty

Defines the CellTemplate property.

public static readonly DependencyProperty CellTemplateProperty

CellTemplateSelectorProperty

Defines the CellTemplateSelector property.

public static readonly DependencyProperty CellTemplateSelectorProperty

CellVerticalAlignmentProperty

Defines the CellVerticalAlignment property.

public static readonly DependencyProperty CellVerticalAlignmentProperty

HeaderCellBorderThicknessProperty

Defines the HeaderCellBorderThickness property.

public static readonly DependencyProperty HeaderCellBorderThicknessProperty

HeaderCellPaddingProperty

Defines the HeaderCellPadding property.

public static readonly DependencyProperty HeaderCellPaddingProperty

HeaderContainerStyleProperty

Defines the HeaderContainerStyle property.

public static readonly DependencyProperty HeaderContainerStyleProperty

HeaderHorizontalAlignmentProperty

Defines the HeaderHorizontalAlignment property.

public static readonly DependencyProperty HeaderHorizontalAlignmentProperty

HeaderProperty

Defines the Header property.

public static readonly DependencyProperty HeaderProperty

HeaderTemplateProperty

Defines the HeaderTemplate property.

public static readonly DependencyProperty HeaderTemplateProperty

HeaderTemplateSelectorProperty

Defines the HeaderTemplateSelector property.

public static readonly DependencyProperty HeaderTemplateSelectorProperty

IndexProperty

Defines the Index property.

public static readonly DependencyProperty IndexProperty

IsFrozenProperty

Defines the IsFrozen property.

public static readonly DependencyProperty IsFrozenProperty

IsResizeGripperEnabledProperty

Defines the IsResizeGripperEnabled property.

public static readonly DependencyProperty IsResizeGripperEnabledProperty

IsVisibleProperty

Defines the IsVisible property.

public static readonly DependencyProperty IsVisibleProperty

MaxWidthProperty

Defines the MaxWidth property.

public static readonly DependencyProperty MaxWidthProperty

MinWidthProperty

Defines the MinWidth property.

public static readonly DependencyProperty MinWidthProperty

SortDirectionProperty

Defines the SortDirection property.

public static readonly DependencyProperty SortDirectionProperty

TagProperty

Defines the Tag property.

public static readonly DependencyProperty TagProperty

TitleProperty

Defines the Title property.

public static readonly DependencyProperty TitleProperty

WidthProperty

Defines the Width property.

public static readonly DependencyProperty WidthProperty

Extension Methods