In This Article

ITreeItemNavigator Interface

Provides the base requirements for an object that can navigate a tree of items.

public interface ITreeItemNavigator

Properties

CurrentItem

Gets the current item.

object CurrentItem { get; }

Property Value

object:

The current item.

Depth

Gets the item depth.

int Depth { get; }

Property Value

int:

The item depth.

Methods

GoToCommonAncestor(object)

Moves to the common ancestor item of CurrentItem and the specified other item.

bool GoToCommonAncestor(object otherItem)
Parameter Type Description
otherItem object

The other item.

Returns

bool:

true if a common ancestor was found, which could be the same as CurrentItem prior to method invocation; otherwise, false.

GoToFirstChild()

Moves to the first child item.

bool GoToFirstChild()

Returns

bool:

true if a move was successfully made; otherwise, false.

GoToFirstVisible()

Moves to the first visible item.

bool GoToFirstVisible()

Returns

bool:

true if a move was successfully made; otherwise, false.

GoToLastVisible()

Moves to the last visible item.

bool GoToLastVisible()

Returns

bool:

true if a move was successfully made; otherwise, false.

GoToNextSibling()

Moves to the next sibling item.

bool GoToNextSibling()

Returns

bool:

true if a move was successfully made; otherwise, false.

GoToNextVisible()

Moves to the next visible item.

bool GoToNextVisible()

Returns

bool:

true if a move was successfully made; otherwise, false.

GoToParent()

Moves to the parent item.

bool GoToParent()

Returns

bool:

true if a move was successfully made; otherwise, false.

GoToPreviousSibling()

Moves to the previous sibling item.

bool GoToPreviousSibling()

Returns

bool:

true if a move was successfully made; otherwise, false.

GoToPreviousVisible()

Moves to the previous visible item.

bool GoToPreviousVisible()

Returns

bool:

true if a move was successfully made; otherwise, false.