using MahApps.Metro.Controls; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; namespace Tango.Stubs.Windows { /// /// Interaction logic for TextInputWindow.xaml /// public partial class TextInputWindow : MetroWindow { public String Response { get; set; } public TextInputWindow() { InitializeComponent(); this.Loaded += TextInputWindow_Loaded; } private void TextInputWindow_Loaded(object sender, RoutedEventArgs e) { txtText.Focus(); } public TextInputWindow(String message, String defaultResponse) : this() { txtText.Text = defaultResponse; if (message != null) { lbMessage.Text = message; } } private void Button_Click(object sender, RoutedEventArgs e) { Response = txtText.Text; DialogResult = true; Close(); } } }