I am wondering what is the best way to allow a user to input text into a MessageDialog in a Windows 10 universal app.(Forgot password system). From the research I\'ve done this
Instead of Height=32, use this:
public static async Task ShowAddDialogAsync(string title)
{
var inputTextBox = new TextBox { AcceptsReturn = false };
(inputTextBox as FrameworkElement).VerticalAlignment = VerticalAlignment.Bottom;
var dialog = new ContentDialog
{
Content = inputTextBox,
Title = title,
IsSecondaryButtonEnabled = true,
PrimaryButtonText = "Ok",
SecondaryButtonText = "Cancel"
};
if (await dialog.ShowAsync() == ContentDialogResult.Primary)
return inputTextBox.Text;
else
return "";
}