Intersoft ClientUI Documentation
UXMessageBox Class
Members  Example 



Provides a dialog box with predefined message, icon and buttons used to obtain user input.
Object Model
UXMessageBox ClassApplicationPackage ClassISFramework ClassUXContextMenu ClassUXContextMenu Class
Syntax
<DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")>
Public Class UXMessageBox 
   Inherits UXDialogBox
   Implements Intersoft.Client.Framework.IApplicationHostIntersoft.Client.Framework.IControlIntersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.IModalWindowIntersoft.Client.Framework.IWindow 
Dim instance As UXMessageBox
[DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")]
public class UXMessageBox : UXDialogBox, Intersoft.Client.Framework.IApplicationHostIntersoft.Client.Framework.IControlIntersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.IModalWindowIntersoft.Client.Framework.IWindow  
[DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")]
public ref class UXMessageBox : public UXDialogBox, Intersoft.Client.Framework.IApplicationHostIntersoft.Client.Framework.IControlIntersoft.Client.Framework.IFramework, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.IModalWindowIntersoft.Client.Framework.IWindow  
Remarks

A message box is a dialog box that can be used to display textual information and to allow users to make decisions with buttons.

To show a message box, you use the Show static method of UXMessageBox class. UXMessageBox provides a set of predefined buttons and icons to let you easily show the message box according to specific message type.

The predefined message box buttons contain the following mode:

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.
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
            }
        }
    );
}
Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            System.Windows.Controls.Control
               System.Windows.Controls.ContentControl
                  Intersoft.Client.Framework.ISContentControl
                     Intersoft.Client.Framework.ISHeaderedContentControl
                        Intersoft.Client.UI.Aqua.UXDesktop.UXWindow
                           Intersoft.Client.UI.Aqua.UXDesktop.UXDialogBox
                              Intersoft.Client.UI.Aqua.UXDesktop.UXMessageBox

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UXMessageBox Members
Intersoft.Client.UI.Aqua.UXDesktop Namespace
Window and Dialog Boxes Overview

Send Feedback