public static string DialogString(string defaultText = "") { DialogGetString dialog = new DialogGetString(); dialog.Owner = Application.Current.MainWindow; dialog.SetDefaultText(defaultText); Point point = Mouse.GetPosition(Application.Current.MainWindow); point = Application.Current.MainWindow.PointToScreen(point); dialog.Top = point.Y; dialog.Left = point.X; dialog.ShowDialog(); return dialog.GetResult(); }
public static string DialogString(string defaultText = "") { DialogGetString dialog = new DialogGetString(); dialog.Owner = Application.Current.MainWindow; dialog.SetDefaultText(defaultText); Point point = Mouse.GetPosition(Application.Current.MainWindow); point = Application.Current.MainWindow.PointToScreen(point); dialog.Top = point.Y; dialog.Left = point.X; dialog.ShowDialog(); return(dialog.GetResult()); }