Table of Contents

Method CanExpand

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

CanExpand(T)

Returns true/false for whether a model has children. This method should be implemented when GetChildren(T) is an expensive operation otherwise SupportsCanExpand should return false (in which case this method will not be called).

bool CanExpand(T toExpand)

Parameters

toExpand T

The object to check for expandability.

Returns

bool

True if the object has children that can be expanded.

Remarks

Only implement this method if you have a very fast way of determining whether an object can have children e.g. checking a Type (directories can always be expanded).