Intersoft ClientUI Documentation
How-to: Open a UXDialogBox with Attached Window

This example shows how to open a UXDialogBox with attached window.

Example

Description

When integrated with desktop manager, the dialog box will be attached to a specified window instance which makes the dialog box modal only to that particular attached window. To learn more about user experiences, see User Experiences Overview.

The following example explains how to show a dialog box that is attached to a parent window.

Code

C#
Copy Code
private void uXButton1_Click(object sender, RoutedEventArgs e)
{
    EditDialogBox dialogBox = new EditDialogBox();
    UXDesktop currentDesktop = this.GetDesktop();
    
    dialogBox.ShowDialog(
        
        // show dialog box attached to the wndHome.
        currentDesktop.FindWindow("wndHome"),

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

Concepts

Other Resources