In This Article

TreeListViewColumn Class

Represents a column definition for a TreeListView control.

public class TreeListViewColumn : DependencyObject, INotifyPropertyChanged
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject 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

System.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

System.Nullable<System.Boolean>:

A nullable System.Boolean 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

System.Nullable<System.Boolean>:

A nullable System.Boolean 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

System.Nullable<System.Boolean>:

A nullable System.Boolean 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 System.Windows.Thickness of the border around cells in this column.

public Thickness CellBorderThickness { get; set; }

Property Value

System.Windows.Thickness:

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

CellContainerStyle

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

public Style CellContainerStyle { get; set; }

Property Value

System.Windows.Style:

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

CellHorizontalAlignment

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

public HorizontalAlignment CellHorizontalAlignment { get; set; }

Property Value

System.Windows.HorizontalAlignment:

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

CellPadding

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

public Thickness CellPadding { get; set; }

Property Value

System.Windows.Thickness:

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

CellTemplate

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

public DataTemplate CellTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

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

CellTemplateSelector

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

public DataTemplateSelector CellTemplateSelector { get; set; }

Property Value

System.Windows.Controls.DataTemplateSelector:

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

CellVerticalAlignment

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

public VerticalAlignment CellVerticalAlignment { get; set; }

Property Value

System.Windows.VerticalAlignment:

The System.Windows.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

System.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

System.Windows.Data.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

System.Object:

The column header content.

HeaderCellBorderThickness

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

public Thickness HeaderCellBorderThickness { get; set; }

Property Value

System.Windows.Thickness:

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

HeaderCellPadding

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

public Thickness HeaderCellPadding { get; set; }

Property Value

System.Windows.Thickness:

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

HeaderContainerStyle

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

public Style HeaderContainerStyle { get; set; }

Property Value

System.Windows.Style:

The System.Windows.Style to use for the column header container.

HeaderHorizontalAlignment

Gets or sets the System.Windows.HorizontalAlignment of the column header content.

public HorizontalAlignment HeaderHorizontalAlignment { get; set; }

Property Value

System.Windows.HorizontalAlignment:

The System.Windows.HorizontalAlignment of the column header content.

HeaderTemplate

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

public DataTemplate HeaderTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

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

HeaderTemplateSelector

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

public DataTemplateSelector HeaderTemplateSelector { get; set; }

Property Value

System.Windows.Controls.DataTemplateSelector:

The System.Windows.Controls.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

System.Int32:

The index of the column within its owner control.

IsFrozen

Gets whether the column is frozen.

public bool IsFrozen { get; }

Property Value

System.Boolean:

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

System.Boolean:

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

System.Boolean:

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

System.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

System.Double:

The minimum column width. The default value is 30.0.

SizeToFitCommand

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

public ICommand SizeToFitCommand { get; }

Property Value

System.Windows.Input.ICommand:

The System.Windows.Input.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

System.Nullable<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

System.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

System.String:

The title of the column.

ToggleVisibilityCommand

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

public ICommand ToggleVisibilityCommand { get; }

Property Value

System.Windows.Input.ICommand:

The System.Windows.Input.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

System.Windows.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

System.ComponentModel.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

Inherited Members

  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()