private void Window_SourceInitialized(object sender, EventArgs e) { try { DavuxLib2.Platform.DwmApi.DwmExtendFrameIntoClientArea (this, new Thickness(0, gLoginTop.ActualHeight * this.GetDPI(), 0, 0)); SessionModel.AppClosing += () => this.Invoke(() => Window_Closing(null, null)); SessionModel.PrefsRequest += () => this.Invoke(() => { Preferences p = new Preferences(); p.Show(); p.Activate(); }); SessionModel.AboutRequest += () => this.Invoke(() => { var p = new About(); p.Show(); p.Activate(); }); SessionModel.ShowRequest += () => this.InvokeDelay(200, () => { // TODO this is another instance that might crash on Windows XP? this.Try( () => ShowActivated = true); Show(); Activate(); Topmost = true; this.InvokeDelay(200, () => Topmost = false); }); vm_init(); } catch (Exception ex) { Debug.WriteLine("MainWindow_SourceInitialized: " + ex); } }
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) { var a = new About(); a.ShowDialog(); }