Adding TextBox to winRT MessageDialog

I am working in a Windows 8 storage application and I am trying to open a dialog so that the user can enter information in a text box eg.

How to do it?

+3


source to share


2 answers


An element InputDialog

in the WinRT XAML Toolkit does exactly that. It's basically a Popup control with a TextBox and some buttons. There is sample for it . The simplest one does this:

var dialog = new InputDialog();
var result = await dialog.ShowAsync(
    "This is the title",
    "This is the content/message",
    "Option 1",
    "Option 2",
    "Option 3");

      



The result is the string that is used on the pressed button - eg. "Option 1".

+5


source


Using the "Callisto" library for this type of dialog is the best option. Check out this library by developing its Code Samples. Callisto code samples .



I really bothered this issue and found this solution very helpful. you can add anything in the Custom dialog box.

+1


source







All Articles