Table of Contents

Class FilteredTreeView<T>

Namespace
NanoByte.Common.EtoControls
Assembly
NanoByte.Common.EtoForms.dll

Displays a list of INameds objects in a Eto.Forms.TreeGridView with incremental search. An automatic hierarchy is generated based on a Separator character.

public sealed class FilteredTreeView<T> : Panel, IHandlerSource, IDisposable, IBindable, IMouseInputSource, IKeyboardInputSource, ICallbackSource, IBindableWidgetContainer where T : INamed

Type Parameters

T

The type of INamed object to list. Special support for types implementing IHighlightColor and/or IContextMenu.

Inheritance
object
Widget
BindableWidget
Control
Container
Panel
FilteredTreeView<T>
Implements
IHandlerSource
IBindable
IMouseInputSource
IKeyboardInputSource
ICallbackSource
IBindableWidgetContainer
Inherited Members
Panel.Remove(Control)
Panel.Controls
Panel.Padding
Panel.MinimumSize
Panel.ContextMenu
Panel.Content
Container.RemoveAll()
Container.ClientSize
Container.Children
Container.VisualChildren
Container.StyleProvider
Container.Styles
Control.SizeChangedEvent
Control.KeyDownEvent
Control.KeyUpEvent
Control.TextInputEvent
Control.MouseDownEvent
Control.MouseUpEvent
Control.MouseMoveEvent
Control.MouseLeaveEvent
Control.MouseEnterEvent
Control.MouseDoubleClickEvent
Control.MouseWheelEvent
Control.GotFocusEvent
Control.LostFocusEvent
Control.ShownEvent
Control.DragDropEvent
Control.DragOverEvent
Control.DragEnterEvent
Control.DragLeaveEvent
Control.DragEndEvent
Control.EnabledChangedEvent
Control.Invalidate()
Control.Invalidate(Rectangle)
Control.UpdateLayout()
Control.GetPreferredSize()
Control.GetPreferredSize(SizeF)
Control.CaptureMouse()
Control.ReleaseMouseCapture()
Control.Detach()
Control.AttachNative()
Control.DetachNative()
Control.Focus()
Control.SuspendLayout()
Control.ResumeLayout()
Control.PointFromScreen(PointF)
Control.PointToScreen(PointF)
Control.RectangleToScreen(RectangleF)
Control.RectangleFromScreen(RectangleF)
Control.DoDragDrop(DataObject, DragEffects)
Control.DoDragDrop(DataObject, DragEffects, Image, PointF)
Control.TriggerStyleChanged()
Control.Print()
Control.Loaded
Control.VisualControls
Control.Tag
Control.LogicalParent
Control.IsVisualControl
Control.Size
Control.IsMouseCaptured
Control.Width
Control.Height
Control.Enabled
Control.Visible
Control.Parent
Control.VisualParent
Control.IsAttached
Control.BackgroundColor
Control.HasFocus
Control.IsSuspended
Control.ParentWindow
Control.SupportedPlatformCommands
Control.Bounds
Control.Location
Control.Cursor
Control.ToolTip
Control.TabIndex
Control.AllowDrop
Control.SizeChanged
Control.KeyDown
Control.KeyUp
Control.TextInput
Control.MouseDown
Control.MouseUp
Control.MouseMove
Control.MouseLeave
Control.MouseEnter
Control.MouseDoubleClick
Control.MouseWheel
Control.GotFocus
Control.LostFocus
Control.Shown
Control.PreLoad
Control.Load
Control.LoadComplete
Control.UnLoad
Control.DragDrop
Control.DragOver
Control.DragEnter
Control.DragLeave
Control.DragEnd
Control.EnabledChanged
BindableWidget.Unbind()
BindableWidget.UpdateBindings(BindingUpdateMode)
BindableWidget.Parents
BindableWidget.DataContext
BindableWidget.Bindings
BindableWidget.IsDataContextChanging
BindableWidget.DataContextChanged
Widget.Dispose()
Widget.ToString()
Widget.Platform
Widget.Handler
Widget.NativeHandle
Widget.Properties
Widget.ID
Widget.Style
Widget.ControlObject
Widget.IsDisposed
Widget.StyleChanged
Extension Methods

Constructors

FilteredTreeView()

public FilteredTreeView()

Properties

CheckBoxes

Controls whether check boxes are displayed for every entry.

public bool CheckBoxes { get; set; }

Property Value

bool

CheckedEntries

Returns a list of all INamed objects currently marked with a check box.

public ICollection<T> CheckedEntries { get; }

Property Value

ICollection<T>

Remarks

Does NOT create a defensive copy. Take care to only add valid elements when modifying. Call UpdateList(object?) after changing.

Nodes

The INamed (and optionally IContextMenu) objects to be listed in the tree.

[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This control is supposed to represent a live and mutable collection")]
public NamedCollection<T>? Nodes { get; set; }

Property Value

NamedCollection<T>

SelectedEntry

The INamed object currently selected in the Eto.Forms.TreeGridView; null for no selection.

public T? SelectedEntry { get; set; }

Property Value

T

Separator

The character used to split Names into tree levels.

public char Separator { get; set; }

Property Value

char

ShowSearchBox

Toggle the visibility of the search box.

public bool ShowSearchBox { get; set; }

Property Value

bool

Methods

Dispose(bool)

Handles the disposal of this control

protected override void Dispose(bool disposing)

Parameters

disposing bool

True if the caller called Eto.Widget.Dispose() manually, false if being called from a finalizer

UpdateList(object?)

Updates the filtered Eto.Forms.TreeGridView representation of Nodes.

public void UpdateList(object? sender = null)

Parameters

sender object

Remarks

Called automatically internally.

Events

CheckedEntriesChanged

Occurs whenever the content of CheckedEntries has changed.

public event EventHandler? CheckedEntriesChanged

Event Type

EventHandler

SelectedEntryChanged

Occurs whenever SelectedEntry has been changed.

public event EventHandler? SelectedEntryChanged

Event Type

EventHandler

SelectionConfirmed

Occurs when the user has confirmed the SelectedEntry via double-clicking or pressing Enter.

public event EventHandler? SelectionConfirmed

Event Type

EventHandler