Gets or sets a value that indicates whether the ChildWindow was accepted or canceled.
Assembly: System.Windows.Controls (in System.Windows.Controls.dll)
A ChildWindow is typically used as a dialog box and provides a value. can be used from the code that showed the ChildWindow to determine whether a user accepted (true) or canceled (false) the dialog box. If a dialog box was accepted, this signifies to the code that opened the child window to retrieve the data that was collected from the user and process it. If a dialog box was canceled, this signifies that the calling code should not process data from the child window.
Setting the value automatically closes the child window. Closing the child window in any other way, including calling the Close method, pressing CTRL+SHIFT+F4, or clicking the close button, will set to false. is null as long as the child window is open.
To get the value from a child window, handle the Closed event in the code-behind page of the calling window. In the Closed event handler, cast the sender parameter to a ChildWindow or a derived class to access the property.
The following code example demonstrates how to set the value in the click events of the OK and Cancel buttons of a ChildWindow. This example is part of a larger example available in the ChildWindow class overview.
The following example demonstrates how to get the value in the Closed event handler. This code is in the page that called the ChildWindow. This example is part of a larger example available in the ChildWindow class overview.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.