/// <summary> /// Shows a question-message dialog requesting input from the user. /// </summary> /// <param name="text">The text display in the message box</param> /// <param name="inputText">the value used to initialize the input text field</param> /// <returns>Return String that user enter. If no such input given, string with zero length will return</returns> public static string Show(String text, String inputText) { SimpleInputDialog simpleDialog = new SimpleInputDialog(text); simpleDialog.inputMessage = inputText; simpleDialog.ShowDialog(); return(simpleDialog.inputMessage); }
public void SetUp() { UITester.Init(typeof(Utils.Net.Sample.App)); UITester.Dispatcher.Invoke(() => { testSimpleInputDialog = new SimpleInputDialog(); var window = new Window() { Content = testSimpleInputDialog, ResizeMode = ResizeMode.NoResize, SizeToContent = SizeToContent.WidthAndHeight, MaxWidth = 300, WindowStartupLocation = WindowStartupLocation.CenterOwner, WindowStyle = WindowStyle.SingleBorderWindow, ShowInTaskbar = false, }; window.Show(); }); }