public void TreeView_ContextMenuClicked(object sender, RoutedEventArgs e)
        {
            MenuItem menuItem = sender as MenuItem;

            switch (menuItem.Header)
            {
            case "Open in new tab":
                (Parent as Conductor <IScreen> .Collection.OneActive).Items.Add(((menuItem.DataContext as DocumentTreeViewItem).ViewModel as Interfaces.ICloseableTabItem).Clone() as IScreen);
                break;

            case "Open in new instance":
                string paths = string.Empty;

                if ((menuItem.DataContext as DocumentTreeViewItem).Items?.Count > 0)
                {
                    foreach (DocumentTreeViewItem sub in (menuItem.DataContext as DocumentTreeViewItem).Items)
                    {
                        if (sub.ViewModel != null)
                        {
                            paths += $"{(sub.ViewModel as Interfaces.IStatusBarText).Path};";
                        }
                    }
                }
                else
                {
                    paths = ((menuItem.DataContext as DocumentTreeViewItem).ViewModel as Interfaces.IStatusBarText).Path;
                }

                System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName, $"-p=\"{paths}\"");
                break;

            case "Copy text":
                Clipboard.SetText(((menuItem.DataContext as DocumentTreeViewItem).ViewModel as Interfaces.ICloseableTabItem).TabHeader);
                break;

            case "Copy path":
                Clipboard.SetText(((menuItem.DataContext as DocumentTreeViewItem).ViewModel as Interfaces.IStatusBarText).Path);
                break;

            case "Close file":
                DocumentTreeViewItem folder = menuItem.DataContext as DocumentTreeViewItem;
                CloseItem(folder.ViewModel);
                if (folder.Parent != null)
                {
                    folder.Parent.Items.Remove(folder);
                }
                else
                {
                    TreeViewPaths.Remove(folder);
                }
                (View as DocumentContainerView).documentTreeView.Items.Refresh();
                break;
            }
        }
        private void SetupTreeViewPaths(string[] paths)
        {
            TreeViewPaths = new BindableCollection <DocumentTreeViewItem>();
            foreach (string path in paths)
            {
                string   fileName = System.IO.Path.GetFileName(path);
                string[] parts    = new string[] { path.Substring(0, path.Length - fileName.Length), fileName };

                if (parts.Any())
                {
                    DocumentTreeViewItem root = TreeViewPaths.FirstOrDefault(folder => folder.Name.Equals(parts[0]) && folder.Level.Equals(1));
                    if (root == null)
                    {
                        root = new DocumentTreeViewItem(1, parts[0])
                        {
                            ViewModel = this
                        };
                        TreeViewPaths.Add(root);
                    }

                    if (parts.Length > 1)
                    {
                        DocumentTreeViewItem parent = root;
                        int level = 2;
                        for (int i = 1; i < parts.Length; ++i)
                        {
                            DocumentTreeViewItem subItem = parent.Items.FirstOrDefault(folder => folder.Name.Equals(parts[i]) && folder.Level.Equals(level));
                            if (subItem == null)
                            {
                                subItem = new DocumentTreeViewItem(level, parts[i])
                                {
                                    ViewModel = Items.FirstOrDefault(vm => (vm as Interfaces.IStatusBarText).Path == path), Parent = parent
                                };
                                parent.Items.Add(subItem);
                            }
                            parent = subItem;
                            level++;
                        }
                    }
                }
            }
        }