Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding TextBox in winRT MessageDialog

I'm working in windows 8 store application and I'm trying to popup a dialog to let the user enter information in a textbox for example.

How to do that ?

like image 871
Ibraheem Al-Saady Avatar asked Dec 01 '25 04:12

Ibraheem Al-Saady


1 Answers

The InputDialog control in WinRT XAML Toolkit does just that. It is basically a Popup control with a TextBox and some buttons. There is a sample for it too. The most basic 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 button that was clicked - e.g. "Option 1".

like image 126
Filip Skakun Avatar answered Dec 02 '25 17:12

Filip Skakun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!