Intersoft ClientUI Documentation
Show Method
See Also  Example Send Feedback
Intersoft.Client.UI.Aqua.UXDesktop Namespace > UXMessageBox Class : Show Method






Displays a message box with simple message in front of the specified window.

Overload List

OverloadDescription
Show(IWindow,String,Action<DialogResult>)Displays a message box with simple message in front of the specified window.  
Show(IWindow,String,String,Action<DialogResult>)Displays a message box with simple message and title bar caption in front of the specified window.  
Show(IWindow,String,String,MessageBoxButton,Action<DialogResult>)Displays a message box in front of the specified window. The message box displays a message, title bar caption and predefined buttons.  
Show(IWindow,String,String,MessageBoxButton,MessageBoxImage,Action<DialogResult>)Displays a message box in front of the specified window. The message box displays a message, title bar caption, button and icon; and it also returns a result.  
Show(IWindow,String,String,MessageBoxButton,MessageBoxImage,DialogResult,Action<DialogResult>)Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, and icon; and it also returns a result.  
Show(IWindow,String,String,MessageBoxButton,MessageBoxImage,DialogResult,MessageBoxOptions,Action<DialogResult>)Displays a message box in front of the specified window. The message box displays a message, title bar caption, button, icon and options; and it also returns a result.  
Show()Displays the window. (Inherited from Intersoft.Client.UI.Aqua.UXDesktop.UXWindow)
Show(FrameworkElement)Displays the window and attach it to a specified owner. (Inherited from Intersoft.Client.UI.Aqua.UXDesktop.UXWindow)

Example

The following example shows how to use the Show static method to display a message box with predefined buttons and icon, and then handle the closing callback in the code.
C#Copy Code
private void UXButton2_Click(object sender, RoutedEventArgs e)
{
    UXMessageBox.Show(

        // owner of the message box
        null, 

        // message
        "Do you want to save this document before the application closes?",

        // caption
        "Notepad",

        // predefined buttons
        Intersoft.Client.UI.Aqua.UXDesktop.MessageBoxButton.YesNoCancel,

        // predefined image
        MessageBoxImage.Question,

        // callback handler for the close event
        (dialogResult) =>
        {
            if (dialogResult == Intersoft.Client.Framework.DialogResult.OK)
            {
                // save the document
            }
        }
    );
}

Remarks

Use to display a message box with simple message in front of specified window.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.