Skip to main content

TreeListMultiSelection.Contains(TreeListNode) Method

Specifies whether a specific node is in the collection of selected nodes.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v23.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

public bool Contains(
    TreeListNode node
)

Parameters

Name Type Description
node TreeListNode

The TreeListNode object to check.

Returns

Type Description
Boolean

true if a node is in the collection of selected nodes; otherwise, false

Remarks

The Contains method defines whether a specific node is selected.

Example

The code below determines whether the first node in the Tree List is selected.

bool firstIsSelected = treeList1.Selection.Contains(treeList1.Nodes[0]);
See Also