private void ContextOpenContainingFolder(object sender, RoutedEventArgs e)
{
UIElement tabTitle = (Control)((MenuItem)e.OriginalSource).Parent;
tabTitle = ((System.Windows.Controls.Primitives.Popup)((Control)tabTitle).Parent).PlacementTarget;
// Find the tab title in tab collection
for (int i = 0; i < tab.Count; i++)
{
if (tab[i].Title == tabTitle)
{
if (tab[i].FullFileName != null && tab[i].FullFileName.Length > 0)
{
System.Diagnostics.Process.Start("explorer.exe", System.IO.Path.GetDirectoryName(tab[i].FullFileName));
}
break;
}
}
}