Class ListView | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
ListView View renders a scrollable list of data where each item can be activated to perform an action.
public class ListView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IDesignable
Inheritance
ListView
Implements
Inherited Members
Constructors
Initializes a new instance of ListView. Set the Source property to display something.
Properties
Gets or sets whether this ListView allows items to be marked.
If set to true more than one item can be selected. If false selecting an item will cause all others to be un-selected. The default is false.
Gets the Terminal.Gui.CollectionNavigator that searches the Source collection as the user types.
Gets or sets the leftmost column that is currently visible (when scrolling horizontally).
Gets the widest item in the list.
Gets or sets the index of the currently selected item.
Gets or sets the IListDataSource backing this ListView, enabling custom rendering.
Gets or sets the index of the item that will appear at the top of the Viewport.
Methods
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.
Ensures the selected item is always visible on the screen.
If AllowsMarking and AllowsMultipleSelection are both true, marks all items.
Marks the SelectedItem if it is not already marked.
Changes the SelectedItem to the next item in the list, scrolling the list if needed.
Changes the SelectedItem to last item in the list, scrolling the list if needed.
Changes the SelectedItem to the first item in the list, scrolling the list if needed.
Changes the SelectedItem to the item just below the bottom of the visible list, scrolling if needed.
Changes the SelectedItem to the item at the top of the visible list.
Changes the SelectedItem to the previous item in the list, scrolling the list if needed.
OnCollectionChanged(NotifyCollectionChangedEventArgs)
Call the event to raises the CollectionChanged.
Called when the View's content is to be drawn. The default implementation does nothing.
Called when Frame changes.
OnHasFocusChanged(bool, View, View)
Invoked after HasFocus has changed. This method is called before the HasFocusChangedevent is raised.
Called when the user presses a key, allowing subscribers to pre-process the key down event. Called before key bindings are invoked and KeyDownNotHandled is raised. SetHandledto true to stop the key from being processed further.
Called when a mouse event occurs within the view's Viewport.
Invokes the OpenSelectedItem event if it is defined.
OnRowRender(ListViewRowEventArgs)
Virtual method that will invoke the RowRender.
Invokes the SelectedItemChanged event if it is defined.
OnViewportChanged(DrawEventArgs)
Called when the Viewport changes. Invokes the ViewportChanged event.
ResumeSuspendCollectionChangedEvent()
Allow resume the CollectionChanged event from being invoked,
SetSourceAsync(ObservableCollection)
Sets the source to an IList value asynchronously.
SetSource(ObservableCollection)
Sets the source of the ListView to an IList.
SuspendCollectionChangedEvent()
Allow suspending the CollectionChanged event from being invoked,
If AllowsMarking and AllowsMultipleSelection are both true, unmarks all marked items other than SelectedItem.
Events
Event to raise when an item is added, removed, or moved, or the entire list is refreshed.
This event is raised when the user Double Clicks on an item or presses ENTER to open the selected item.
This event is invoked when this ListView is being drawn before rendering.
This event is raised when the selected item in the ListView has changed.