public static string Perform(Window parent, string title, string caption, string initialText) { var window = new TextEditWindow().Create(title, caption, initialText); window.Owner = parent; window.WindowStartupLocation = WindowStartupLocation.CenterOwner; var dialogResult = window.ShowDialog(); var result = dialogResult == true ? window.Edit.Text : null; return result; }
public static string Perform(Window parent, string title, string caption, string initialText) { var window = new TextEditWindow().Create(title, caption, initialText); window.Owner = parent; window.WindowStartupLocation = WindowStartupLocation.CenterOwner; var dialogResult = window.ShowDialog(); var result = dialogResult == true ? window.Edit.Text : null; return(result); }