Intersoft ClientUI Documentation
DialogResult Property
See Also  Example Send Feedback
Intersoft.Client.UI.Aqua.UXDesktop Namespace > UXDialogBox Class : DialogResult Property






Gets or sets the value that represents the result of the dialog box.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property DialogResult As DialogResult
Visual Basic (Usage)Copy Code
Dim instance As UXDialogBox
Dim value As DialogResult
 
instance.DialogResult = value
 
value = instance.DialogResult
C# 
[CategoryAttribute("Common Properties")]
public DialogResult DialogResult {get; set;}
Delphi 
public read-write property DialogResult: DialogResult; 
JScript 
CategoryAttribute("Common Properties")
public function get,set DialogResult : DialogResult
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property DialogResult get_DialogResult();
public: __property void set_DialogResult( 
   DialogResult value
);
C++/CLI 
[CategoryAttribute("Common Properties")]
public:
property DialogResult DialogResult {
   DialogResult get();
   void set (    DialogResult value);
}

Example

This following example shows how to get the dialog result of a UXDialogBox in the callback of the ShowDialog method.
C#Copy Code
private void UXButton1_Click(object sender, RoutedEventArgs e)
{
    EditDialogBox dialogBox = new EditDialogBox();
    
    dialogBox.ShowDialog(
        
        // show dialog box in standalone mode
        null,

        // callback handler for the close event
        (dialogResult) =>
        {
            if (dialogResult == Intersoft.Client.Framework.DialogResult.OK)
            {
                MessageBox.Show("The dialog box result is OK");
            }
        });
}

Remarks

Since the dialog box is mostly used to gather user input, UXDialogBox provides a consistent way to obtain the result of the dialog box through DialogResult enumeration. While you can explicitly set the DialogResult property of the dialog box in the Closing event, ClientUI provides a more consistent technique that streamlines the DialogResult value through the properties of ClientUI button controls such as UXButton, UXToolBarButton, and more.

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.