[This is preliminary documentation and is subject to change.]
Author: Ed Ball
Gets parent (in visual tree) of given DependencyObject
Namespace: Tools.WindowsT.WPFAssembly: Tools.Windows (in Tools.Windows.dll) Version: 1.5.3.38916 (1.5.3.38916)
Syntax
| C# |
|---|
public static DependencyObject GetVisualParent( this DependencyObject obj ) |
| Visual Basic |
|---|
<ExtensionAttribute> _ Public Shared Function GetVisualParent ( _ obj As DependencyObject _ ) As DependencyObject |
| Visual C++ |
|---|
[ExtensionAttribute] public: static DependencyObject^ GetVisualParent( DependencyObject^ obj ) |
| F# |
|---|
static member GetVisualParent : obj:DependencyObject -> DependencyObject |
| JScript |
|---|
public static function GetVisualParent( obj : DependencyObject ) : DependencyObject |
Parameters
- obj
- Type: System.Windows..::..DependencyObject
DependencyObject to get parent of
Return Value
Parent of given dependency object; null when obj is null or no parent can be foundUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DependencyObject. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Remarks
Parent is obtained either via GetParent(ContentElement) for ContentElement or via GetParent(DependencyObject).