Share via


Popup.SetWindow Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Sets the window that is the parent of the Popup control.

Namespace:  System.Windows.Controls.Primitives
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Sub SetWindow ( _
    associatedWindow As Window _
)
public void SetWindow(
    Window associatedWindow
)

Parameters

Exceptions

Exception Condition
NotSupportedException

The application is not an out-of-browser application.

ArgumentNullException

The associatedWindow is nulla null reference (Nothing in Visual Basic).

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.