// Select from dir TreeView
        private void foldersItem_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var tree = (TreeView)sender;
            var temp = ((TreeViewItem)tree.SelectedItem);

            if (temp == null)
            {
                return;
            }
            SelectedImagePath = "";
            var temp2 = "";

            while (true)
            {
                var temp1 = temp.Header.ToString();
                if (temp1.Contains(@"\"))
                {
                    temp2 = "";
                }
                SelectedImagePath = temp1 + temp2 + SelectedImagePath;
                if (temp.Parent.GetType() == typeof(TreeView))
                {
                    break;
                }
                temp  = ((TreeViewItem)temp.Parent);
                temp2 = @"\";
            }
            DirExplorerViewModel.ChangeDirEvent(SelectedImagePath);
        }
        private void DeserializeTreeView(string fileName)
        {
            XmlTextReader reader = null;

            try
            {
                reader = new XmlTextReader(fileName);
                while (reader.Read())
                {
                    if (reader.NodeType == XmlNodeType.Element)
                    {
                        //for load from explorer
                        if (reader.Name == "Node")
                        {
                            reader.MoveToAttribute("Node");
                            foreach (TreeViewItem dataNo in foldersItem.Items)
                            {
                                if (dataNo.Header.ToString() == reader.Value)
                                {
                                    dataNo.IsExpanded = true;
                                }

                                if (dataNo.IsExpanded)
                                {
                                    TreeRunnerLoad(reader.Value, dataNo);
                                }
                            }
                        }
                        // for load from explorer
                        if (reader.Name == "SelectedImagePath")
                        {
                            reader.MoveToAttribute("SelectedImagePath");

                            SelectedImagePath = reader.Value;
                            DirExplorerViewModel.ChangeDirEvent(SelectedImagePath);
                        }
                        // for load from DB
                        if (reader.Name == "Category")
                        {
                            DbTree.IsSelected = true;
                            reader.MoveToAttribute("Category");
                            DirExplorerViewModel.SelectedinDbChanged(reader.Value);
                            _currentCategoryInDb = reader.Value;
                        }
                    }
                    else if (reader.NodeType == XmlNodeType.XmlDeclaration)
                    {
                        //Ignore Xml Declaration
                    }
                    else if (reader.NodeType == XmlNodeType.None)
                    {
                        return;
                    }
                }
            }

            catch (Exception)
            {
                // ignored
            }
            finally
            {
                reader.Close();
            }
        }