fix crash

This commit is contained in:
Paddy Xu
2018-02-12 21:06:20 +02:00
parent 4133d2148c
commit 354bbfc1ca

View File

@@ -50,12 +50,9 @@ namespace QuickLook.Plugin.IPreviewHandlers
public void PreviewFile(string file, ContextObject context)
{
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
{
_control = new PreviewHandlerHost();
presenter.Child = _control;
_control.Open(file);
}), DispatcherPriority.Loaded);
_control = new PreviewHandlerHost();
presenter.Child = _control;
_control.Open(file);
//SetForegroundWindow(new WindowInteropHelper(context.ViewerWindow).Handle);
//SetActiveWindow(presenter.Handle);