.NET Framework Class Library for Silverlight
Window.GetWindow Method
Gets the window that contains the specified DependencyObject.
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
Syntax
Visual Basic (Declaration)
Public Shared Function GetWindow ( _ dependencyObject As DependencyObject _ ) As Window
C#
public static Window GetWindow( DependencyObject dependencyObject )
Parameters
- dependencyObject
- Type: System.Windows.DependencyObject
The object contained by the Window to get.
Exceptions
| Exception | Condition |
|---|---|
| NotSupportedException |
The application is not running outside the browser. |
| InvalidOperationException |
dependencyObject is not a valid DependencyObject. |
Version Information
Silverlight
Supported in: 5Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also