获得节点的完整路径,然后计算该路径被PathSeparator分成了几断。
string fullPath=selectedNode.FullPath;
int level=fullPath.Split('/').GetLength(0);