Dialog

Display native dialogs

Reference the library

C#
using CI.WSANative.Dialogs;

Show a basic ok dialog

C#
WSANativeDialog.ShowDialog("Title", "This is a message");

Show a yes / no dialog

C#
WSANativeDialog.ShowDialogWithOptions("Title", "Message", (WSADialogResult result) => { if (result.ButtonPressed == "Yes") { // Yes was pressed } else { // No was pressed } });

Show a dialog with custom buttons

Max of 3 buttons for desktop - if more than max are added an exception will be thrown

C#
WSANativeDialog.ShowDialogWithOptions("Title", "Message", new List() { new WSADialogCommand("Yes"), new WSADialogCommand("No"), new WSADialogCommand("Cancel") }, 0, 2 (WSADialogResult result) => { if (result.ButtonPressed == "Yes") { // Yes was pressed } else if(result.ButtonPressed == "No") { // No was pressed } else { // Cancel was pressed } });