public void Preview(object path, object caller, System.Windows.Point? pos)
{
Application.Current.Dispatcher.Invoke(new Action(delegate()
{
Properties p = null;
foreach (var w in Application.Current.Windows)
if (w is Properties)
p = (Properties)w;
if (p != null)
LoadWindow(path as WrapperFileSystemInfo, p, caller, pos);
else
{
p = new Properties();
p.Loaded += delegate(object sender, RoutedEventArgs e)
{
LoadWindow(path as WrapperFileSystemInfo, p, caller, pos);
};
p.Show();
}
}));
}