C# Class InTheHand.UI.Popups.MessageDialog

Represents a dialog.
The dialog has a command bar that can support up to three commands. If you don't specify any commands, then a default command is added to close the dialog.

The dialog dims the screen behind it and blocks touch events from passing to the app's canvas until the user responds.

Message dialogs should be used sparingly, and only for critical messages or simple questions that must block the user's flow.

PlatformVersion supported AndroidAndroid 4.4 and later iOSiOS 9.0 and later macOSOS X 10.7 and later tvOStvOS 9.0 and later Windows UWPWindows 10 Windows StoreWindows 8.1 or later Windows Phone StoreWindows Phone 8.1 or later Windows Phone SilverlightWindows Phone 8.0 or later Windows (Desktop Apps)Windows Vista or later
Datei anzeigen Open project: inthehand/Charming Class Usage Examples

Public Methods

Method Description
MessageDialog ( string content ) : System

Initializes a new instance of the MessageDialog class to display an untitled message dialog box that can be used to ask your user simple questions.

MessageDialog ( string content, string title ) : System

Initializes a new instance of the MessageDialog class to display a titled message dialog box that can be used to ask your user simple questions.

ShowAsync ( ) : Task

Begins an asynchronous operation showing a dialog.

In some cases, such as when the dialog is closed by the system out of your control, your result can be an empty command. Returns either the command selected which destroyed the dialog, or an empty command. For example, a dialog hosted in a charms window will return an empty command if the charms window has been dismissed.

Private Methods

Method Description
ActionClicked ( UIAlertAction action ) : void
Cd_PrimaryButtonClick ( Windows sender, Windows args ) : void
Cd_SecondaryButtonClick ( Windows sender, Windows args ) : void
Clicked ( object sender, Android e ) : void
NSAlert_onEnded ( nint command ) : void
ShowTaskDialog ( ) : IUICommand

Method Details

MessageDialog() public method

Initializes a new instance of the MessageDialog class to display an untitled message dialog box that can be used to ask your user simple questions.
public MessageDialog ( string content ) : System
content string The message you want displayed to the user.
return System

MessageDialog() public method

Initializes a new instance of the MessageDialog class to display a titled message dialog box that can be used to ask your user simple questions.
public MessageDialog ( string content, string title ) : System
content string The message you want displayed to the user.
title string The title you want displayed on the dialog box.
return System

ShowAsync() public method

Begins an asynchronous operation showing a dialog.
In some cases, such as when the dialog is closed by the system out of your control, your result can be an empty command. Returns either the command selected which destroyed the dialog, or an empty command. For example, a dialog hosted in a charms window will return an empty command if the charms window has been dismissed.
public ShowAsync ( ) : Task
return Task