public static void ActivateWindow(Process process = null) { if (process == null) { process = Process.GetCurrentProcess(); } SingleInstance <App> .ActivateWindow(process); }
public bool SignalExternalCommandLineArgs(IList <string> args) { // handle command line arguments of second instance SingleInstance.ActivateWindow(Process.GetCurrentProcess()); Trace.TraceInformation("Received args: {0}", String.Join(" ", args)); return(true); }
public bool SignalExternalCommandLineArgs(IList <string> args) { // handle command line arguments of second instance SingleInstance <App> .ActivateWindow(Process.GetCurrentProcess()); Current.MainWindow.WindowState = WindowState.Maximized; Current.MainWindow.Topmost = true; return(true); }