Returns a DependencyObject value that represents the parent
of the visual object of the specified type. Method looks up the visual tree until
the desired parent element is found or parent element is null.
Namespace:
C1.SilverlightAssembly: C1.Silverlight (in C1.Silverlight.dll)
Syntax
C# |
---|
public static DependencyObject GetParentOfType( DependencyObject reference, Type type ) |
Visual Basic |
---|
Public Shared Function GetParentOfType ( _ reference As DependencyObject, _ type As Type _ ) As DependencyObject |
Parameters
- reference
- Type: System.Windows..::..DependencyObject
The visual whose parent is returned.
- type
- Type: System..::..Type
The Type of the parent element to search for.