TreeListView Class
Represents an advanced multi-column tree view control.
public class TreeListView : TreeListBox
- Inheritance:
- object Visual UIElement FrameworkElement Control ItemsControl TreeListBox object
- Derived:
- PropertyGrid ShellListView
Constructors
TreeListView()
Initializes an instance of the class.
public TreeListView()
Properties
AreColumnHeadersVisible
Indicates whether column headers are visible.
public bool AreColumnHeadersVisible { get; set; }
Property Value
- bool:
trueif column headers are visible; otherwise,false. The default value istrue.
CanColumnsReorder
Indicates whether columns can be reordered by the end user.
public bool CanColumnsReorder { get; set; }
Property Value
- bool:
trueif columns can be reordered by the end user; otherwise,false. The default value isfalse.
CanColumnsResize
Indicates whether columns can be resized by the end user.
public bool CanColumnsResize { get; set; }
Property Value
- bool:
trueif columns can be resized by the end user; otherwise,false. The default value istrue.
CanColumnsToggleVisibility
Indicates whether columns can have their visibility toggled by the end user.
public bool CanColumnsToggleVisibility { get; set; }
Property Value
- bool:
trueif columns can have their visibility toggled by the end user; otherwise,false. The default value isfalse.
ColumnHeaderHeight
The height of the column header.
Columns
The collection of columns in the control.
public ObservableCollection<TreeListViewColumn> Columns { get; }
Property Value
ExpansionColumnIndex
The index of the columns that contains the indentation and expander button.
FrozenColumnCount
The number of non-scrolling columns, that are always displayed left-most and cannot be scrolled out of visibility.
IsDefaultColumnHeaderContextMenuEnabled
Indicates whether the default column header context menu is enabled.
public bool IsDefaultColumnHeaderContextMenuEnabled { get; set; }
Property Value
- bool:
trueif the default column header context menu is enabled; otherwise,false. The default value istrue.
IsKeyboardFocusWithinContent
Indicates whether keyboard focus is within the content area, and not in any header area.
protected override bool IsKeyboardFocusWithinContent { get; }
Property Value
- bool:
trueif keyboard focus is within the content area; otherwise,false.
SizeAllColumnsToFitCommand
The ICommand that sizes all non-star width columns to fit.
Methods
ArrangeOverride(Size)
Called to arrange and size the content of a Control object.
protected override Size ArrangeOverride(Size finalSize)
| Parameter | Type | Description |
|---|---|---|
| finalSize | Size |
Returns
- Size:
The size of the control.
ClearContainerForItemOverride(DependencyObject, object)
When overridden in a derived class, undoes the effects of the PrepareContainerForItemOverride(DependencyObject, object) method.
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
| Parameter | Type | Description |
|---|---|---|
| element | DependencyObject | The container element. |
| item | object | The item. |
GetColumnHeaderVisibility(ScrollViewer)
Gets the value of the ColumnHeaderVisibility attached property for the specified object.
public static Visibility GetColumnHeaderVisibility(ScrollViewer obj)
| Parameter | Type | Description |
|---|---|---|
| obj | ScrollViewer | The object from which the property value is read. |
Returns
GetContainerForItemOverride()
Creates or identifies the element that is used to display the given item.
protected override DependencyObject GetContainerForItemOverride()
Returns
- DependencyObject:
The element that is used to display the given item.
GetFrozenColumnsWidth(ScrollViewer)
Gets the value of the FrozenColumnsWidth attached property for the specified object.
public static double GetFrozenColumnsWidth(ScrollViewer obj)
| Parameter | Type | Description |
|---|---|---|
| obj | ScrollViewer | The object from which the property value is read. |
Returns
IsItemItsOwnContainerOverride(object)
Determines if the specified item is (or is eligible to be) its own container.
protected override bool IsItemItsOwnContainerOverride(object item)
| Parameter | Type | Description |
|---|---|---|
| item | object | The item to check. |
Returns
- bool:
trueif the item is (or is eligible to be) its own container; otherwise,false.
MeasureOverride(Size)
Called to remeasure a control.
protected override Size MeasureOverride(Size availableSize)
| Parameter | Type | Description |
|---|---|---|
| availableSize | Size |
Returns
- Size:
The size of the control, up to the maximum specified by
constraint.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnColumnHeaderMenuRequested(TreeListViewColumnMenuEventArgs)
Occurs when a column header requests a context menu.
protected virtual void OnColumnHeaderMenuRequested(TreeListViewColumnMenuEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TreeListViewColumnMenuEventArgs | The event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
OnColumnHeaderTapped(TreeListViewColumnEventArgs)
Occurs when a column's header is tapped.
protected virtual void OnColumnHeaderTapped(TreeListViewColumnEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TreeListViewColumnEventArgs | The event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
OnColumnIsVisibleChanged(TreeListViewColumnEventArgs)
Occurs when a column's visibility has changed.
protected virtual void OnColumnIsVisibleChanged(TreeListViewColumnEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TreeListViewColumnEventArgs | The event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
OnColumnReordered(TreeListViewColumnEventArgs)
Occurs after a column is reordered by the end user.
protected virtual void OnColumnReordered(TreeListViewColumnEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TreeListViewColumnEventArgs | The event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
OnColumnsResized(RoutedEventArgs)
Occurs after the ActualWidth of one or more columns changes.
protected virtual void OnColumnsResized(RoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | RoutedEventArgs | The event data. |
Remarks
This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnScrollViewerScrollChanged(ScrollChangedEventArgs)
Occurs when the scroll viewer's scroll is changed.
protected override void OnScrollViewerScrollChanged(ScrollChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | ScrollChangedEventArgs | The event data. |
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
| Parameter | Type | Description |
|---|---|---|
| element | DependencyObject | Element used to display the specified item. |
| item | object | Specified item. |
SetColumnHeaderVisibility(ScrollViewer, Visibility)
Sets the value of the ColumnHeaderVisibility attached property to the specified object.
public static void SetColumnHeaderVisibility(ScrollViewer obj, Visibility value)
| Parameter | Type | Description |
|---|---|---|
| obj | ScrollViewer | The object to which the attached property is written. |
| value | Visibility | The value to set. |
SetFrozenColumnsWidth(ScrollViewer, double)
Sets the value of the FrozenColumnsWidth attached property to the specified object.
public static void SetFrozenColumnsWidth(ScrollViewer obj, double value)
| Parameter | Type | Description |
|---|---|---|
| obj | ScrollViewer | The object to which the attached property is written. |
| value | double | The value to set. |
SizeAllColumnsToFit()
Sizes all non-star width columns to fit.
public void SizeAllColumnsToFit()
Events
ColumnHeaderMenuRequested
Occurs when a column header requests a context menu.
public event EventHandler<TreeListViewColumnMenuEventArgs> ColumnHeaderMenuRequested
Event Type
ColumnHeaderTapped
Occurs when a column's header is tapped.
public event EventHandler<TreeListViewColumnEventArgs> ColumnHeaderTapped
Event Type
ColumnIsVisibleChanged
Occurs when a column's visibility has changed.
public event EventHandler<TreeListViewColumnEventArgs> ColumnIsVisibleChanged
Event Type
ColumnReordered
Occurs after a column is reordered by the end user.
public event EventHandler<TreeListViewColumnEventArgs> ColumnReordered
Event Type
ColumnsResized
Occurs after the ActualWidth of one or more columns changes.
Fields
AreColumnHeadersVisibleProperty
Defines the AreColumnHeadersVisible property.
public static readonly DependencyProperty AreColumnHeadersVisibleProperty
CanColumnsReorderProperty
Defines the CanColumnsReorder property.
public static readonly DependencyProperty CanColumnsReorderProperty
CanColumnsResizeProperty
Defines the CanColumnsResize property.
public static readonly DependencyProperty CanColumnsResizeProperty
CanColumnsToggleVisibilityProperty
Defines the CanColumnsToggleVisibility property.
public static readonly DependencyProperty CanColumnsToggleVisibilityProperty
ColumnHeaderHeightProperty
Defines the ColumnHeaderHeight property.
public static readonly DependencyProperty ColumnHeaderHeightProperty
ColumnHeaderMenuRequestedEvent
Defines the ColumnHeaderMenuRequested routed event.
public static readonly RoutedEvent ColumnHeaderMenuRequestedEvent
ColumnHeaderTappedEvent
Defines the ColumnHeaderTapped routed event.
public static readonly RoutedEvent ColumnHeaderTappedEvent
ColumnHeaderVisibilityProperty
Defines the ColumnHeaderVisibility property.
public static readonly DependencyProperty ColumnHeaderVisibilityProperty
ColumnIsVisibleChangedEvent
Defines the ColumnIsVisibleChanged routed event.
public static readonly RoutedEvent ColumnIsVisibleChangedEvent
ColumnReorderedEvent
Defines the ColumnReordered routed event.
public static readonly RoutedEvent ColumnReorderedEvent
ColumnsResizedEvent
Defines the ColumnsResized routed event.
public static readonly RoutedEvent ColumnsResizedEvent
ExpansionColumnIndexProperty
Defines the ExpansionColumnIndex property.
public static readonly DependencyProperty ExpansionColumnIndexProperty
FrozenColumnCountProperty
Defines the FrozenColumnCount property.
public static readonly DependencyProperty FrozenColumnCountProperty
FrozenColumnsWidthProperty
Defines the FrozenColumnsWidth property.
public static readonly DependencyProperty FrozenColumnsWidthProperty
IsDefaultColumnHeaderContextMenuEnabledProperty
Defines the IsDefaultColumnHeaderContextMenuEnabled property.
public static readonly DependencyProperty IsDefaultColumnHeaderContextMenuEnabledProperty
Inherited Members
- TreeListBox.AutoExpandItemsOnFilterProperty
- TreeListBox.CanDragItemsProperty
- TreeListBox.DataFilterProperty
- TreeListBox.EmptyContentProperty
- TreeListBox.EmptyContentTemplateProperty
- TreeListBox.HasTreeLinesProperty
- TreeListBox.IndentIncrementProperty
- TreeListBox.IsDataVirtualizationEnabledProperty
- TreeListBox.IsEmptyProperty
- TreeListBox.IsFilterActiveProperty
- TreeListBox.IsRootItemVisibleProperty
- TreeListBox.IsSelectionActiveProperty
- TreeListBox.ItemAdapterProperty
- TreeListBox.MultiDragKindProperty
- TreeListBox.PathSeparatorProperty
- TreeListBox.RootItemProperty
- TreeListBox.TopLevelIndentProperty
- TreeListBox.ItemDataFormat
- TreeListBox.FilterAppliedEvent
- TreeListBox.IsRootItemVisibleChangedEvent
- TreeListBox.ItemCollapsedEvent
- TreeListBox.ItemCollapsingEvent
- TreeListBox.ItemDefaultActionExecutingEvent
- TreeListBox.ItemExpandedEvent
- TreeListBox.ItemExpandingEvent
- TreeListBox.ItemMenuRequestedEvent
- TreeListBox.ItemSelectingEvent
- TreeListBox.RootItemChangedEvent
- TreeListBox.SelectionChangedEvent
- TreeListBox.CanSelectItemOnFocusProperty
- TreeListBox.MultiSelectionKindProperty
- TreeListBox.SelectionModeProperty
- TreeListBox.SelectedItemProperty
- TreeListBox.BringItemIntoView(object)
- TreeListBox.BringItemIntoViewByFullPath(string)
- TreeListBox.CollapseAll()
- TreeListBox.ExpandAll()
- TreeListBox.GetFullPath(object)
- TreeListBox.GetItemByFullPath(string)
- TreeListBox.GetItemNavigator(object)
- TreeListBox.InvalidateChildren(object)
- TreeListBox.GetIsSelectionActive(TreeListBox)
- TreeListBox.OnDragEnter(DragEventArgs)
- TreeListBox.OnDragLeave(DragEventArgs)
- TreeListBox.OnDragOver(DragEventArgs)
- TreeListBox.OnDrop(DragEventArgs)
- TreeListBox.OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)
- TreeListBox.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- TreeListBox.OnItemsSourceChanged(IEnumerable, IEnumerable)
- TreeListBox.OnKeyDown(KeyEventArgs)
- TreeListBox.ProcessKeyDown(KeyEventArgs)
- TreeListBox.OnFilterApplied(RoutedEventArgs)
- TreeListBox.OnIsRootItemVisibleChanged(RoutedEventArgs)
- TreeListBox.OnItemCollapsed(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemCollapsing(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemDefaultActionExecuting(TreeListBoxItemEventArgs)
- TreeListBox.OnItemExpanded(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemExpanding(TreeListBoxItemExpansionEventArgs)
- TreeListBox.OnItemMenuRequested(TreeListBoxItemMenuEventArgs)
- TreeListBox.OnItemSelecting(TreeListBoxItemEventArgs)
- TreeListBox.OnRootItemChanged(RoutedEventArgs)
- TreeListBox.OnSelectionChanged(SelectionChangedEventArgs)
- TreeListBox.FocusItem(object)
- TreeListBox.FocusItemByFullPath(string)
- TreeListBox.CreateSelectionBatch()
- TreeListBox.SelectItemByFullPath(string)
- TreeListBox.AssemblyInfo
- TreeListBox.AutoExpandItemsOnFilter
- TreeListBox.CanDragItems
- TreeListBox.CanExpandAll
- TreeListBox.DataFilter
- TreeListBox.EmptyContent
- TreeListBox.EmptyContentTemplate
- TreeListBox.HasTreeLines
- TreeListBox.IndentIncrement
- TreeListBox.IsDataVirtualizationEnabled
- TreeListBox.IsEmpty
- TreeListBox.IsFilterActive
- TreeListBox.IsRootItemVisible
- TreeListBox.ItemAdapter
- TreeListBox.MultiDragKind
- TreeListBox.PathSeparator
- TreeListBox.RootItem
- TreeListBox.TopLevelIndent
- TreeListBox.CanSelectItemOnFocus
- TreeListBox.MultiSelectionKind
- TreeListBox.SelectionMode
- TreeListBox.SelectedItem
- TreeListBox.SelectedItems
- TreeListBox.FilterApplied
- TreeListBox.IsRootItemVisibleChanged
- TreeListBox.ItemCollapsed
- TreeListBox.ItemCollapsing
- TreeListBox.ItemDefaultActionExecuting
- TreeListBox.ItemExpanded
- TreeListBox.ItemExpanding
- TreeListBox.ItemMenuRequested
- TreeListBox.ItemSelecting
- TreeListBox.RootItemChanged
- TreeListBox.SelectionChanged