Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
xupefei committed Feb 12, 2018
1 parent 4133d21 commit 354bbfc
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ public void Dispose()

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);
Expand Down

0 comments on commit 354bbfc

Please sign in to comment.