I want to display a textbox inside my Message dialog to take user inputs & click OK button to retrieve textbox value in my MainPage.cs,
private async void join_btn_Click(object sender, RoutedEventArgs e)
{
var messageDialog = new MessageDialog(" Enter your secure code Here");
messageDialog.Title = "Join session";
messageDialog.Commands.Add(new UICommand(
"OK",
new UICommandInvokedHandler(this.CommandInvokedHandlerOKFunction)));
messageDialog.DefaultCommandIndex = 0;
messageDialog.CancelCommandIndex = 1;
await messageDialog.ShowAsync();
}
Any suggestion about how to do it??
Instead of using MessageDialog you can use InputBox. Here you can get the textbox value. try the below code,
this myvalue string is return what ever your entered in the input Textbox value.
i hope this will help you.