Table of Contents

Class TreeItemExtensions

Namespace
Loehnert.Lisrt.TypeAndResult.VisualTreeHelpers
Assembly
Loehnert.Lisrt.TypeAndResult.dll

Extensions for the ITreeItem.

public static class TreeItemExtensions
Inheritance
TreeItemExtensions
Inherited Members

Methods

GetSelectedTreeItemRecursive(ITreeItem)

Get the selected ITreeItem.

public static ITreeItem GetSelectedTreeItemRecursive(this ITreeItem treeItem)

Parameters

treeItem ITreeItem

Parent tree item.

Returns

ITreeItem

The selected ITreeItem or null if no item is selected.

Exceptions

ArgumentNullException

Thrown when treeItem is null.

GetSelectedTreeItemRecursive(IEnumerable<ITreeItem>)

Gets the selected ITreeItem from an IEnumerable<T>.

public static ITreeItem GetSelectedTreeItemRecursive(this IEnumerable<ITreeItem> treeItems)

Parameters

treeItems IEnumerable<ITreeItem>

Tree items.

Returns

ITreeItem

The selected ITreeItem or null if no item is selected.