Universal Windows Platform – Tutorial Insider – Input Dialog

Standard

Overview

comentsys.wordpress.com kicks off it’s latest tutorials about the Universal Windows Platform with Input Dialog, this allows you to create a ContentDialog with a TextBox in it that you can enter any text and this is used in the tutorial to be displayed in a MessageDialog – this example shows how to use two different dialogs especially one that allows you to input something quickly and easily.

Details

Input Dialog uses ContentDialog where a TextBox is used as the Content that has its Height set to a standard Application Resource which is the Minimum height of a Text Control in Windows 10 called TextControlThemeMinHeight it also some PlaceholderText set which is text that appears in the background of the TextBox, ContentDialog also has the Title and the MaxWidth of the Dialog that will be shown set.

In Universal Windows Platform all dialogs are displayed asynchronously, this means they might not be shown or that the response may not be returned immediately, the await keyword is used to wait for a result from a dialog or just to display it with the ShowAsync(). There’s just a single button that makes up the MainPage of the example which is a Button that will display the ContentDialog, there it will show a dialog with the TextBox and any text may be entered there before selecting OK to then show a MessageDialog with the entered text.

Behind the Scenes

This is the first comentsys.wordpress.com tutorial a ContentDialog has been used for input – in other older programming languages they also featured Input Dialogs that were quite useful and this example is a way of showing how to recreate this functionality. This tutorial continues the tradition of having a dialog based example for the first one in a set of tutorials, there’s a lot more things you can display in a dialog and many subsequent tutorials will also demonstrate this.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s