I want to maintain a stack navigation in which we store path of directories.but in my code im able to store only current path and if i change my directories i lost my old stack.
for ex if i chande my directory from "My computer to Dowloads " then i am not able to keep path for my computer

here is  my sample code
 private void btnBack_Click(object sender, RoutedEventArgs e)
        {
            //string Tree1;
            IList childFileList = new List();
            // string Path = (sender as Button).ToString();
            IList childDirList = new List();
            if (stack.Count > 1)
            {
                stack.Pop();
                stackNext.Push(stack.Peek());
                string Path = stack.Peek().ToString();
                isback = true;


               //code for create button by sending drive info
                //DirInfo dnr = new DirInfo();
                //dnr.Path = Path;
                //vm.createButton(dnr);
           
               vm.createB(Path);


               if (Path == "My Computer")
               {


                   childDirList = (from rd in FileSystemExplorerService.GetRootDirectories1(vm.CurrentDirectory.Path)
                                   select new DirInfo(rd)).ToList();
               }
               else if (Path == "My Favourite" || Path == "My Library")
               {


                   childDirList = FileSystemExplorerService.GetRootDirectory1(Path);
               }


               else
               {
                   childDirList = (from dir in FileSystemExplorerService.GetChildDirectories(Path)
                                   select new DirInfo(dir)).ToList();


                   childFileList = (from fobj in FileSystemExplorerService.GetChildFiles(Path)
                                    select new DirInfo(fobj)).ToList();


                   childDirList = childDirList.Concat(childFileList).ToList();
               }
               vm.CurrentItems = childDirList;
               
                if (stack.Count > 1)
                {
                    btnNext.IsEnabled = true;
                }
                else
                    btnBack.IsEnabled = false;
            }
        }
       




        //private void RemoveRightSideButtonsFromNavigationBar(string Content)
        //{
        //    bool flagRemove = false;
        //    List