public bool IsParentOf(ExplorerItemViewModel argItem)
        {
            ExplorerItemViewModel tmpParent = argItem.Parent;

            while (tmpParent != null && tmpParent != this)
            {
                tmpParent = tmpParent.Parent;
            }

            return(tmpParent == this);
        }
 private void OnFolderExpanded()
 {
     if (this.NavigateToFolder != null && this.NavigateToFolder != this.ExplorerItem.Path)
     {
         string[] tmpPathLeftSections = this.NavigateToFolder.Remove(0, this.ExplorerItem.Path.Length).Split(new char[] { '\\' }, StringSplitOptions.RemoveEmptyEntries);
         if (tmpPathLeftSections.Any())
         {
             string tmpChildFolder            = tmpPathLeftSections[0];
             ExplorerItemViewModel tmpChildVM = this.Children.Where(item => item.ExplorerItem.Name == tmpChildFolder).FirstOrDefault();
             if (tmpChildVM != null)
             {
                 tmpChildVM.NavigateTo(this.NavigateToFolder);
             }
         }
         this.NavigateToFolder = null;
     }
 }
 public ExplorerItemViewModel(ExplorerItem argItem, Action <ExplorerItemViewModel> argSelectedCallback, ExplorerItemViewModel argParent)
     : this(argItem, argSelectedCallback)
 {
     this.parent = argParent;
 }