void logViewButton_Click(object sender, RoutedEventArgs e) { NotifyLogWindow dlg = new NotifyLogWindow(); PresentationSource topWindow = PresentationSource.FromVisual(this); if (topWindow != null) { dlg.Owner = (Window)topWindow.RootVisual; } dlg.ShowDialog(); }
void OpenNotifyLogDialog() { var dlg = new NotifyLogWindow(); dlg.Owner = CommonUtil.GetTopWindow(this); dlg.ShowDialog(); }