# TreeView class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[Handler(TreeView.IHandler)]
public class TreeView : Control
```

> **Obsolete:** Since 2.4. TreeView is deprecated, please use TreeGridView instead.

Standard tree view control with a single column

**Remarks:** This uses the standard tree view controls on windows, so it can sometimes be more desirable to use to give a more natural feel in that case. For a tree with multiple columns, use the [TreeGridView](https://eto.picoe.ca/api/type/eto.forms.treegridview.md).

## Fields

- [ActivatedEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/activatedevent.md): (static) Identifier for handlers when attaching the [TreeView.Activated](https://eto.picoe.ca/api/type/eto.forms.treeview/activated.md) event
- [CollapsedEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsedevent.md): (static) Identifier for handlers when attaching the [TreeView.Collapsed](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsed.md) event
- [CollapsingEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsingevent.md): (static) Identifier for handlers when attaching the [TreeView.Collapsing](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsing.md) event
- [ExpandedEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/expandedevent.md): (static) Identifier for handlers when attaching the [TreeView.Expanded](https://eto.picoe.ca/api/type/eto.forms.treeview/expanded.md) event
- [ExpandingEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/expandingevent.md): (static) Identifier for handlers when attaching the [TreeView.Expanding](https://eto.picoe.ca/api/type/eto.forms.treeview/expanding.md) event
- [LabelEditedEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/labeleditedevent.md): (static) Identifier for handlers when attaching the [TreeView.LabelEdited](https://eto.picoe.ca/api/type/eto.forms.treeview/labeledited.md) event
- [LabelEditingEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/labeleditingevent.md): (static) Identifier for handlers when attaching the [TreeView.LabelEditing](https://eto.picoe.ca/api/type/eto.forms.treeview/labelediting.md) event
- [NodeMouseClickEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/nodemouseclickevent.md): (static) Identifier for handlers when attaching the [TreeView.NodeMouseClick](https://eto.picoe.ca/api/type/eto.forms.treeview/nodemouseclick.md) event
- [SelectionChangedEvent](https://eto.picoe.ca/api/type/eto.forms.treeview/selectionchangedevent.md): (static) Identifier for handlers when attaching the [TreeView.SelectionChanged](https://eto.picoe.ca/api/type/eto.forms.treeview/selectionchanged.md) event

## Properties

- [ContextMenu](https://eto.picoe.ca/api/type/eto.forms.treeview/contextmenu.md): Gets or sets the context menu to show when the user right clicks or presses the menu key
- [DataStore](https://eto.picoe.ca/api/type/eto.forms.treeview/datastore.md): Gets or sets the data store.
- [LabelEdit](https://eto.picoe.ca/api/type/eto.forms.treeview/labeledit.md): Gets or sets a value indicating whether users can edit the labels of items
- [SelectedItem](https://eto.picoe.ca/api/type/eto.forms.treeview/selecteditem.md): Gets or sets the selected item.
- [TextColor](https://eto.picoe.ca/api/type/eto.forms.treeview/textcolor.md): Gets or sets the color of the text for all nodes.

## Methods

- [GetCallback](https://eto.picoe.ca/api/type/eto.forms.treeview/getcallback.md): Gets an instance of an object used to perform callbacks to the widget from handler implementations
- [GetNodeAt](https://eto.picoe.ca/api/type/eto.forms.treeview/getnodeat.md): Gets the node at a specified point from the origin of the control
- [OnActivated](https://eto.picoe.ca/api/type/eto.forms.treeview/onactivated.md): Raises the [TreeView.Activated](https://eto.picoe.ca/api/type/eto.forms.treeview/activated.md) event.
- [OnCollapsed](https://eto.picoe.ca/api/type/eto.forms.treeview/oncollapsed.md): Raises the [TreeView.Collapsed](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsed.md) event.
- [OnCollapsing](https://eto.picoe.ca/api/type/eto.forms.treeview/oncollapsing.md): Raises the [TreeView.Collapsing](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsing.md) event.
- [OnExpanded](https://eto.picoe.ca/api/type/eto.forms.treeview/onexpanded.md): Raises the [TreeView.Expanded](https://eto.picoe.ca/api/type/eto.forms.treeview/expanded.md) event.
- [OnExpanding](https://eto.picoe.ca/api/type/eto.forms.treeview/onexpanding.md): Raises the [TreeView.Expanding](https://eto.picoe.ca/api/type/eto.forms.treeview/expanding.md) event.
- [OnLabelEdited](https://eto.picoe.ca/api/type/eto.forms.treeview/onlabeledited.md): Raises the [TreeView.LabelEdited](https://eto.picoe.ca/api/type/eto.forms.treeview/labeledited.md) event.
- [OnLabelEditing](https://eto.picoe.ca/api/type/eto.forms.treeview/onlabelediting.md): Raises the [TreeView.LabelEditing](https://eto.picoe.ca/api/type/eto.forms.treeview/labelediting.md) event.
- [OnNodeMouseClick](https://eto.picoe.ca/api/type/eto.forms.treeview/onnodemouseclick.md): Raises the [TreeView.NodeMouseClick](https://eto.picoe.ca/api/type/eto.forms.treeview/nodemouseclick.md) event.
- [OnSelectionChanged](https://eto.picoe.ca/api/type/eto.forms.treeview/onselectionchanged.md): Raises the [TreeView.SelectionChanged](https://eto.picoe.ca/api/type/eto.forms.treeview/selectionchanged.md) event.
- [RefreshData](https://eto.picoe.ca/api/type/eto.forms.treeview/refreshdata.md): Refreshes the data, keeping the selection
- [RefreshItem](https://eto.picoe.ca/api/type/eto.forms.treeview/refreshitem.md): Refreshes the specified item and all its children, keeping the selection if not part of the refreshed nodes

## Events

- [Activated](https://eto.picoe.ca/api/type/eto.forms.treeview/activated.md): Event to handle when an item is activated
- [Collapsed](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsed.md): Occurs after an item has been collapsed
- [Collapsing](https://eto.picoe.ca/api/type/eto.forms.treeview/collapsing.md): Occurs before an item is collapsed
- [Expanded](https://eto.picoe.ca/api/type/eto.forms.treeview/expanded.md): Occurs after an item has been expanded
- [Expanding](https://eto.picoe.ca/api/type/eto.forms.treeview/expanding.md): Occurs before an item is expanding
- [LabelEdited](https://eto.picoe.ca/api/type/eto.forms.treeview/labeledited.md): Occurs after the label of an item has been edited
- [LabelEditing](https://eto.picoe.ca/api/type/eto.forms.treeview/labelediting.md): Occurs before an items label is edited
- [NodeMouseClick](https://eto.picoe.ca/api/type/eto.forms.treeview/nodemouseclick.md): Occurs when a node is clicked with the mouse
- [SelectionChanged](https://eto.picoe.ca/api/type/eto.forms.treeview/selectionchanged.md): Occurs when the selection has been changed by the user or programattically

## Inherited Members

- From [Control](https://eto.picoe.ca/api/type/eto.forms.control.md): [AllowDrop](https://eto.picoe.ca/api/type/eto.forms.control/allowdrop.md), [BackgroundColor](https://eto.picoe.ca/api/type/eto.forms.control/backgroundcolor.md), [Bounds](https://eto.picoe.ca/api/type/eto.forms.control/bounds.md), [Cursor](https://eto.picoe.ca/api/type/eto.forms.control/cursor.md), [Enabled](https://eto.picoe.ca/api/type/eto.forms.control/enabled.md), [Gestures](https://eto.picoe.ca/api/type/eto.forms.control/gestures.md), [Handler](https://eto.picoe.ca/api/type/eto.forms.control/handler.md), [HasFocus](https://eto.picoe.ca/api/type/eto.forms.control/hasfocus.md), [Height](https://eto.picoe.ca/api/type/eto.forms.control/height.md), [IsAttached](https://eto.picoe.ca/api/type/eto.forms.control/isattached.md), [IsMouseCaptured](https://eto.picoe.ca/api/type/eto.forms.control/ismousecaptured.md), [IsSuspended](https://eto.picoe.ca/api/type/eto.forms.control/issuspended.md), [IsVisualControl](https://eto.picoe.ca/api/type/eto.forms.control/isvisualcontrol.md), [Loaded](https://eto.picoe.ca/api/type/eto.forms.control/loaded.md), [Location](https://eto.picoe.ca/api/type/eto.forms.control/location.md), [LogicalParent](https://eto.picoe.ca/api/type/eto.forms.control/logicalparent.md), [Parent](https://eto.picoe.ca/api/type/eto.forms.control/parent.md), [ParentWindow](https://eto.picoe.ca/api/type/eto.forms.control/parentwindow.md), [Size](https://eto.picoe.ca/api/type/eto.forms.control/size.md), [SupportedPlatformCommands](https://eto.picoe.ca/api/type/eto.forms.control/supportedplatformcommands.md), [TabIndex](https://eto.picoe.ca/api/type/eto.forms.control/tabindex.md), [TabStop](https://eto.picoe.ca/api/type/eto.forms.control/tabstop.md), [Tag](https://eto.picoe.ca/api/type/eto.forms.control/tag.md), [ToolTip](https://eto.picoe.ca/api/type/eto.forms.control/tooltip.md), [Visible](https://eto.picoe.ca/api/type/eto.forms.control/visible.md), [VisualControls](https://eto.picoe.ca/api/type/eto.forms.control/visualcontrols.md), [VisualParent](https://eto.picoe.ca/api/type/eto.forms.control/visualparent.md), [Width](https://eto.picoe.ca/api/type/eto.forms.control/width.md), [DragDrop](https://eto.picoe.ca/api/type/eto.forms.control/dragdrop.md), [DragEnd](https://eto.picoe.ca/api/type/eto.forms.control/dragend.md), [DragEnter](https://eto.picoe.ca/api/type/eto.forms.control/dragenter.md), [DragLeave](https://eto.picoe.ca/api/type/eto.forms.control/dragleave.md), [DragOver](https://eto.picoe.ca/api/type/eto.forms.control/dragover.md), [EnabledChanged](https://eto.picoe.ca/api/type/eto.forms.control/enabledchanged.md), [GotFocus](https://eto.picoe.ca/api/type/eto.forms.control/gotfocus.md), [KeyDown](https://eto.picoe.ca/api/type/eto.forms.control/keydown.md), [KeyUp](https://eto.picoe.ca/api/type/eto.forms.control/keyup.md), [Load](https://eto.picoe.ca/api/type/eto.forms.control/load.md), [LoadComplete](https://eto.picoe.ca/api/type/eto.forms.control/loadcomplete.md), [LostFocus](https://eto.picoe.ca/api/type/eto.forms.control/lostfocus.md), [MouseDoubleClick](https://eto.picoe.ca/api/type/eto.forms.control/mousedoubleclick.md), [MouseDown](https://eto.picoe.ca/api/type/eto.forms.control/mousedown.md), [MouseEnter](https://eto.picoe.ca/api/type/eto.forms.control/mouseenter.md), [MouseLeave](https://eto.picoe.ca/api/type/eto.forms.control/mouseleave.md), [MouseMove](https://eto.picoe.ca/api/type/eto.forms.control/mousemove.md), [MouseUp](https://eto.picoe.ca/api/type/eto.forms.control/mouseup.md), [MouseWheel](https://eto.picoe.ca/api/type/eto.forms.control/mousewheel.md), [PreLoad](https://eto.picoe.ca/api/type/eto.forms.control/preload.md), [Shown](https://eto.picoe.ca/api/type/eto.forms.control/shown.md), [SizeChanged](https://eto.picoe.ca/api/type/eto.forms.control/sizechanged.md), [TextInput](https://eto.picoe.ca/api/type/eto.forms.control/textinput.md), [ThemeChanged](https://eto.picoe.ca/api/type/eto.forms.control/themechanged.md), [UnLoad](https://eto.picoe.ca/api/type/eto.forms.control/unload.md), [ApplyStyles](https://eto.picoe.ca/api/type/eto.forms.control/applystyles.md), [AttachNative](https://eto.picoe.ca/api/type/eto.forms.control/attachnative.md), [CaptureMouse](https://eto.picoe.ca/api/type/eto.forms.control/capturemouse.md), [Detach](https://eto.picoe.ca/api/type/eto.forms.control/detach.md), [DetachNative](https://eto.picoe.ca/api/type/eto.forms.control/detachnative.md), [Dispose](https://eto.picoe.ca/api/type/eto.forms.control/dispose.md), [DoDragDrop](https://eto.picoe.ca/api/type/eto.forms.control/dodragdrop.md), [FindParent](https://eto.picoe.ca/api/type/eto.forms.control/findparent.md), [Focus](https://eto.picoe.ca/api/type/eto.forms.control/focus.md), [GetPreferredSize](https://eto.picoe.ca/api/type/eto.forms.control/getpreferredsize.md), [Invalidate](https://eto.picoe.ca/api/type/eto.forms.control/invalidate.md), [MapPlatformCommand](https://eto.picoe.ca/api/type/eto.forms.control/mapplatformcommand.md), [OnApplyCascadingStyles](https://eto.picoe.ca/api/type/eto.forms.control/onapplycascadingstyles.md), [OnDragDrop](https://eto.picoe.ca/api/type/eto.forms.control/ondragdrop.md), [OnDragEnd](https://eto.picoe.ca/api/type/eto.forms.control/ondragend.md), [OnDragEnter](https://eto.picoe.ca/api/type/eto.forms.control/ondragenter.md), [OnDragLeave](https://eto.picoe.ca/api/type/eto.forms.control/ondragleave.md), [OnDragOver](https://eto.picoe.ca/api/type/eto.forms.control/ondragover.md), [OnEnabledChanged](https://eto.picoe.ca/api/type/eto.forms.control/onenabledchanged.md), [OnGotFocus](https://eto.picoe.ca/api/type/eto.forms.control/ongotfocus.md), [OnKeyDown](https://eto.picoe.ca/api/type/eto.forms.control/onkeydown.md), [OnKeyUp](https://eto.picoe.ca/api/type/eto.forms.control/onkeyup.md), [OnLoad](https://eto.picoe.ca/api/type/eto.forms.control/onload.md), [OnLoadComplete](https://eto.picoe.ca/api/type/eto.forms.control/onloadcomplete.md), [OnLostFocus](https://eto.picoe.ca/api/type/eto.forms.control/onlostfocus.md), [OnMouseDoubleClick](https://eto.picoe.ca/api/type/eto.forms.control/onmousedoubleclick.md), [OnMouseDown](https://eto.picoe.ca/api/type/eto.forms.control/onmousedown.md), [OnMouseEnter](https://eto.picoe.ca/api/type/eto.forms.control/onmouseenter.md), [OnMouseLeave](https://eto.picoe.ca/api/type/eto.forms.control/onmouseleave.md), [OnMouseMove](https://eto.picoe.ca/api/type/eto.forms.control/onmousemove.md), [OnMouseUp](https://eto.picoe.ca/api/type/eto.forms.control/onmouseup.md), [OnMouseWheel](https://eto.picoe.ca/api/type/eto.forms.control/onmousewheel.md), [OnPreLoad](https://eto.picoe.ca/api/type/eto.forms.control/onpreload.md), [OnShown](https://eto.picoe.ca/api/type/eto.forms.control/onshown.md), [OnSizeChanged](https://eto.picoe.ca/api/type/eto.forms.control/onsizechanged.md), [OnStyleChanged](https://eto.picoe.ca/api/type/eto.forms.control/onstylechanged.md), [OnTextInput](https://eto.picoe.ca/api/type/eto.forms.control/ontextinput.md), [OnThemeChanged](https://eto.picoe.ca/api/type/eto.forms.control/onthemechanged.md), [OnUnLoad](https://eto.picoe.ca/api/type/eto.forms.control/onunload.md), [PointFromScreen](https://eto.picoe.ca/api/type/eto.forms.control/pointfromscreen.md), [PointToScreen](https://eto.picoe.ca/api/type/eto.forms.control/pointtoscreen.md), [Print](https://eto.picoe.ca/api/type/eto.forms.control/print.md), [RectangleFromScreen](https://eto.picoe.ca/api/type/eto.forms.control/rectanglefromscreen.md), [RectangleToScreen](https://eto.picoe.ca/api/type/eto.forms.control/rectangletoscreen.md), [ReleaseMouseCapture](https://eto.picoe.ca/api/type/eto.forms.control/releasemousecapture.md), [ResumeLayout](https://eto.picoe.ca/api/type/eto.forms.control/resumelayout.md), [SuspendLayout](https://eto.picoe.ca/api/type/eto.forms.control/suspendlayout.md), [TriggerStyleChanged](https://eto.picoe.ca/api/type/eto.forms.control/triggerstylechanged.md), [UpdateLayout](https://eto.picoe.ca/api/type/eto.forms.control/updatelayout.md)
- From [BindableWidget](https://eto.picoe.ca/api/type/eto.forms.bindablewidget.md): [Bindings](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/bindings.md), [DataContext](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/datacontext.md), [IsDataContextChanging](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/isdatacontextchanging.md), [Parents](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/parents.md), [DataContextChanged](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/datacontextchanged.md), [OnDataContextChanged](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/ondatacontextchanged.md), [Unbind](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/unbind.md), [UpdateBindings](https://eto.picoe.ca/api/type/eto.forms.bindablewidget/updatebindings.md)
- From [Widget](https://eto.picoe.ca/api/type/eto.widget.md): [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md), [ID](https://eto.picoe.ca/api/type/eto.widget/id.md), [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md), [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md), [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md), [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md), [Style](https://eto.picoe.ca/api/type/eto.widget/style.md), [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md), [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md), [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md), [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md)
