public static void MyShow(string tip, string title, Action <string> callback, string inputDef = null, string helpurl = null, Func <string, string> validator = null, Window owner = null, bool startUpCenterOwner = false) { var editor = new WndInput(tip, title, inputDef, helpurl, validator); editor.Owner = owner; editor.Closed += (sender, e) => { if (editor._isClosedByOkButton) { callback(editor.Result); } }; WindowEx.xSetStartUpLocation(editor, startUpCenterOwner); WindowEx.xShowFirstTime(editor); }