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 TreeListViewColumn class.

public TreeListViewColumn()

Properties

ActualWidth

Gets the actual width of the column.

public double ActualWidth { get; }

Property Value

double:

The actual width of the column.

AutoWidthMode

Gets or sets 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:

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

CanReorder

Gets or sets 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

Gets or sets 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

Gets or sets 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

Gets or sets the Thickness of the border around cells in this column.

public Thickness CellBorderThickness { get; set; }

Property Value

Thickness:

The Thickness of the border around cells in this column. The default value is 0.

CellContainerStyle

Gets or sets the Style that defines the visual representation of the column's cells.

public Style CellContainerStyle { get; set; }

Property Value

Style:

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

CellHorizontalAlignment

Gets or sets the HorizontalAlignment of the cell content in this column.

public HorizontalAlignment CellHorizontalAlignment { get; set; }

Property Value

HorizontalAlignment:

The HorizontalAlignment of the cell content in this column. The default value is Stretch.

CellPadding

Gets or sets the Thickness of the padding in cells in this column.

public Thickness CellPadding { get; set; }

Property Value

Thickness:

The Thickness of the padding in cells in this column. The default value is 7, 2.

CellTemplate

Gets or sets the DataTemplate that defines the visual representation of the column's cells.

public DataTemplate CellTemplate { get; set; }

Property Value

DataTemplate:

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

CellTemplateSelector

Gets or sets the DataTemplateSelector that selects which template to use for the column's cells.

public DataTemplateSelector CellTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

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

CellVerticalAlignment

Gets or sets the VerticalAlignment of the cell content in this column.

public VerticalAlignment CellVerticalAlignment { get; set; }

Property Value

VerticalAlignment:

The VerticalAlignment of the cell content in this column. The default value is Center.

ClipX

Gets the clip x-location.

public double ClipX { get; }

Property Value

double:

The clip x-location.

DisplayMemberBinding

Gets or sets the data item to bind to for this column.

public BindingBase DisplayMemberBinding { get; set; }

Property Value

BindingBase:

The data item to bind to for this column.

Header

Gets or sets the column header content.

public object Header { get; set; }

Property Value

object:

The column header content.

HeaderCellBorderThickness

Gets or sets the Thickness of the border around the header cell in this column.

public Thickness HeaderCellBorderThickness { get; set; }

Property Value

Thickness:

The Thickness of the border around the header cell in this column. The default value is 0, 0, 1, 1.

HeaderCellPadding

Gets or sets the Thickness of the padding in the header cell in this column.

public Thickness HeaderCellPadding { get; set; }

Property Value

Thickness:

The Thickness of the padding in the header cell in this column. The default value is 7, 2.

HeaderContainerStyle

Gets or sets the Style to use for the column header container.

public Style HeaderContainerStyle { get; set; }

Property Value

Style:

The Style to use for the column header container.

HeaderHorizontalAlignment

Gets or sets the HorizontalAlignment of the column header content.

public HorizontalAlignment HeaderHorizontalAlignment { get; set; }

Property Value

HorizontalAlignment:

The HorizontalAlignment of the column header content.

HeaderTemplate

Gets or sets the DataTemplate that defines the visual representation of the column header.

public DataTemplate HeaderTemplate { get; set; }

Property Value

DataTemplate:

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

HeaderTemplateSelector

Gets or sets the DataTemplateSelector that selects which template to use for the column header.

public DataTemplateSelector HeaderTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

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

Index

Gets the index of the column within its owner control.

public int Index { get; }

Property Value

int:

The index of the column within its owner control.

IsFrozen

Gets 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

Gets 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

Gets or sets 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

Gets or sets the maximum column width.

public double MaxWidth { get; set; }

Property Value

double:

The maximum column width. The default value is NaN, meaning no maximum.

MinWidth

Gets or sets the minimum column width.

public double MinWidth { get; set; }

Property Value

double:

The minimum column width. The default value is 30.0.

SizeToFitCommand

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

public ICommand SizeToFitCommand { get; }

Property Value

ICommand:

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

SortDirection

Gets or sets the column sort direction.

public ColumnSortDirection? SortDirection { get; set; }

Property Value

ColumnSortDirection?:

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

Tag

Gets or sets custom data for the column.

public object Tag { get; set; }

Property Value

object:

The custom data for the column.

Title

Gets or sets 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:

The title of the column.

ToggleVisibilityCommand

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

public ICommand ToggleVisibilityCommand { get; }

Property Value

ICommand:

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

Width

Gets or sets the column width.

public GridLength Width { get; set; }

Property Value

GridLength:

The column width. 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 has been changed.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler

Fields

AutoWidthModeProperty

Identifies the AutoWidthMode dependency property. This field is read-only.

public static readonly DependencyProperty AutoWidthModeProperty

CanReorderProperty

Identifies the CanReorder dependency property. This field is read-only.

public static readonly DependencyProperty CanReorderProperty

CanResizeProperty

Identifies the CanResize dependency property. This field is read-only.

public static readonly DependencyProperty CanResizeProperty

CanToggleVisibilityProperty

Identifies the CanToggleVisibility dependency property. This field is read-only.

public static readonly DependencyProperty CanToggleVisibilityProperty

CellBorderThicknessProperty

Identifies the CellBorderThickness dependency property. This field is read-only.

public static readonly DependencyProperty CellBorderThicknessProperty

CellContainerStyleProperty

Identifies the CellContainerStyle dependency property. This field is read-only.

public static readonly DependencyProperty CellContainerStyleProperty

CellHorizontalAlignmentProperty

Identifies the CellHorizontalAlignment dependency property. This field is read-only.

public static readonly DependencyProperty CellHorizontalAlignmentProperty

CellPaddingProperty

Identifies the CellPadding dependency property. This field is read-only.

public static readonly DependencyProperty CellPaddingProperty

CellTemplateProperty

Identifies the CellTemplate dependency property. This field is read-only.

public static readonly DependencyProperty CellTemplateProperty

CellTemplateSelectorProperty

Identifies the CellTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty CellTemplateSelectorProperty

CellVerticalAlignmentProperty

Identifies the CellVerticalAlignment dependency property. This field is read-only.

public static readonly DependencyProperty CellVerticalAlignmentProperty

HeaderCellBorderThicknessProperty

Identifies the HeaderCellBorderThickness dependency property. This field is read-only.

public static readonly DependencyProperty HeaderCellBorderThicknessProperty

HeaderCellPaddingProperty

Identifies the HeaderCellPadding dependency property. This field is read-only.

public static readonly DependencyProperty HeaderCellPaddingProperty

HeaderContainerStyleProperty

Identifies the HeaderContainerStyle dependency property. This field is read-only.

public static readonly DependencyProperty HeaderContainerStyleProperty

HeaderHorizontalAlignmentProperty

Identifies the HeaderHorizontalAlignment dependency property. This field is read-only.

public static readonly DependencyProperty HeaderHorizontalAlignmentProperty

HeaderProperty

Identifies the Header dependency property. This field is read-only.

public static readonly DependencyProperty HeaderProperty

HeaderTemplateProperty

Identifies the HeaderTemplate dependency property. This field is read-only.

public static readonly DependencyProperty HeaderTemplateProperty

HeaderTemplateSelectorProperty

Identifies the HeaderTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty HeaderTemplateSelectorProperty

IndexProperty

Identifies the Index dependency property. This field is read-only.

public static readonly DependencyProperty IndexProperty

IsFrozenProperty

Identifies the IsFrozen dependency property. This field is read-only.

public static readonly DependencyProperty IsFrozenProperty

IsResizeGripperEnabledProperty

Identifies the IsResizeGripperEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsResizeGripperEnabledProperty

IsVisibleProperty

Identifies the IsVisible dependency property. This field is read-only.

public static readonly DependencyProperty IsVisibleProperty

MaxWidthProperty

Identifies the MaxWidth dependency property. This field is read-only.

public static readonly DependencyProperty MaxWidthProperty

MinWidthProperty

Identifies the MinWidth dependency property. This field is read-only.

public static readonly DependencyProperty MinWidthProperty

SortDirectionProperty

Identifies the SortDirection dependency property. This field is read-only.

public static readonly DependencyProperty SortDirectionProperty

TagProperty

Identifies the Tag dependency property. This field is read-only.

public static readonly DependencyProperty TagProperty

TitleProperty

Identifies the Title dependency property. This field is read-only.

public static readonly DependencyProperty TitleProperty

WidthProperty

Identifies the Width dependency property. This field is read-only.

public static readonly DependencyProperty WidthProperty