VisualTreeHelperExtensionsFindAncestorT Method |
Finds a specific ancestor of a dependency object.
Namespace:
Ptv.XServer.Controls.Map
Assembly:
Ptv.XServer.Controls.Map (in Ptv.XServer.Controls.Map.dll) Version: 1.7.10.0
Syntax public static T FindAncestor<T>(
this DependencyObject obj
)
where T : DependencyObject
<ExtensionAttribute>
Public Shared Function FindAncestor(Of T As DependencyObject) (
obj As DependencyObject
) As T
public:
[ExtensionAttribute]
generic<typename T>
where T : DependencyObject
static T FindAncestor(
DependencyObject^ obj
)
[<ExtensionAttribute>]
static member FindAncestor :
obj : DependencyObject -> 'T when 'T : DependencyObject
Parameters
- obj
- Type: System.WindowsDependencyObject
Dependency object to find the ancestor for.
Type Parameters
- T
- Type to lookup
Return Value
Type:
TFound ancestor or null.
Usage 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
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also