Table of Contents

Class TreeView

Namespace
Skyline.DataMiner.Utils.InteractiveAutomationScript
Assembly
Skyline.DataMiner.Utils.InteractiveAutomationScriptToolkit.dll

A tree view structure.

public class TreeView : InteractiveWidget
Inheritance
TreeView
Inherited Members
Extension Methods

Constructors

TreeView(IEnumerable<TreeViewItem>)

Initializes a new instance of the TreeView class.

Properties

CheckedItems

Gets all items in the tree view that are selected.

CheckedLeaves

Gets all leaves (= items without children) in the tree view that are selected.

CheckedNodes

Gets all nodes (= items with children) in the tree view that are selected.

IsReadOnly

Gets or sets a value indicating whether the control is displayed in read-only mode. Read-only mode causes the widgets to appear read-write but the user won't be able to change their value. This only affects interactive scripts running in a web environment.

Items

Gets or sets the top-level items in the tree view. The TreeViewItem.ChildItems property can be used to navigate further down the tree.

Tooltip

Gets or sets the tooltip.

Methods

Collapse()

Sets the IsCollapsed state for all items in the tree view to true, causing the entire tree view to be collapsed.

Expand()

Sets the IsCollapsed state for all items in the tree view to false, causing the entire tree view to be expanded.

GetAllItems()

Iterates over all items in the tree and returns them in a flat collection.

GetItems(int)

Returns all items in the tree view that are located at the provided depth. Whenever the requested depth is greater than the longest branch in the tree, an empty collection will be returned.

LoadResult(UIResults)

Load any changes made through user interaction.

RaiseResultEvents()

Raises zero or more events of the widget. This method is called after LoadResult(UIResults) was called on all widgets.

TryFindTreeViewItem(string, out TreeViewItem)

Can be used to retrieve an item from the tree view based on its key value.

UpdateItemCache()

This method is used to update the cached TreeViewItems and lookup table. This is done after loading the results from the UI Block, after handling the Events or when setting the Items. This method should only be called from outside the TreeView if you are checking or collapsing items from outside of the TreeView and need to access the CheckedItems or CollapsedItems.

Events

Changed

Triggered when a different item is selected or no longer selected. WantsOnChange will be set to true when this event is subscribed to.

Checked

Triggered whenever an item is selected. WantsOnChange will be set to true when this event is subscribed to.

Collapsed

Triggered whenever an item is collapsed. Will be triggered whenever a node with SupportsLazyLoading set to true is collapsed.

Expanded

Triggered whenever an item is expanded. Can be used for lazy loading. Will be triggered whenever a node with SupportsLazyLoading set to true is expanded.

Unchecked

Triggered whenever an item is no longer selected. WantsOnChange will be set to true when this event is subscribed to.