Compartir a través de


ExtensionMethods.FindDescendant Method (DependencyObject, Predicate<DependencyObject>)

Microsoft internal use only.

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function FindDescendant ( _
    obj As DependencyObject, _
    predicate As Predicate(Of DependencyObject) _
) As DependencyObject
public static DependencyObject FindDescendant(
    this DependencyObject obj,
    Predicate<DependencyObject> predicate
)
[ExtensionAttribute]
public:
static DependencyObject^ FindDescendant(
    DependencyObject^ obj, 
    Predicate<DependencyObject^>^ predicate
)
static member FindDescendant : 
        obj:DependencyObject * 
        predicate:Predicate<DependencyObject> -> DependencyObject
public static function FindDescendant(
    obj : DependencyObject, 
    predicate : Predicate<DependencyObject>
) : DependencyObject

Parameters

  • obj
    Type: DependencyObject

    The object at which to begin searching.

  • predicate
    Type: Predicate<DependencyObject>

    The predicate that selects the descendant object.

Return Value

Type: DependencyObject
The first descendant that satisfies the predicate, or null if no descendant is found.

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).

.NET Framework Security

See Also

Reference

ExtensionMethods Class

FindDescendant Overload

Microsoft.VisualStudio.PlatformUI Namespace