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






Provides a dialog box with predefined message, icon and buttons used to obtain user input.

Object Model

UXMessageBox Class

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")>
Public Class UXMessageBox 
   Inherits UXDialogBox
   Implements IApplicationHostIControlIFramework, ILicensing, IModalWindowIWindow 
Visual Basic (Usage)Copy Code
Dim instance As UXMessageBox
C# 
[DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")]
public class UXMessageBox : UXDialogBox, IApplicationHostIControlIFramework, ILicensing, IModalWindowIWindow  
Delphi 
public class UXMessageBox = class(UXDialogBox, IApplicationHost, IControl, IFramework, ILicensing, IModalWindow, IWindow)
JScript 
DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")
public class UXMessageBox extends UXDialogBox implements IApplicationHostIControlIFramework, ILicensing, IModalWindowIWindow 
Managed Extensions for C++ 
[DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")]
public __gc class UXMessageBox : public UXDialogBox, IApplicationHostIControlIFramework, ILicensing, IModalWindowIWindow  
C++/CLI 
[DescriptionAttribute("Provides a dialog box with predefined message, icon and buttons used to obtain user input.")]
public ref class UXMessageBox : public UXDialogBox, IApplicationHostIControlIFramework, ILicensing, IModalWindowIWindow  

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

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:

  • OK
  • OKCancel
  • YesNoCancel
  • YesNo
  • Custom

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 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.