ExtensionMethods.FindCommonAncestor Method (DependencyObject, DependencyObject)

Finds the common ancestor of obj1 and obj2 using the GetVisualOrLogicalParent as the parent evaluation method.

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

Syntax

声明
<ExtensionAttribute> _
Public Shared Function FindCommonAncestor ( _
    obj1 As DependencyObject, _
    obj2 As DependencyObject _
) As DependencyObject
用法
Dim obj1 As DependencyObject
Dim obj2 As DependencyObject
Dim returnValue As DependencyObject

returnValue = obj1.FindCommonAncestor(obj2)
public static DependencyObject FindCommonAncestor(
    this DependencyObject obj1,
    DependencyObject obj2
)
[ExtensionAttribute]
public:
static DependencyObject^ FindCommonAncestor(
    DependencyObject^ obj1, 
    DependencyObject^ obj2
)
static member FindCommonAncestor : 
        obj1:DependencyObject * 
        obj2:DependencyObject -> DependencyObject 
public static function FindCommonAncestor(
    obj1 : DependencyObject, 
    obj2 : DependencyObject
) : DependencyObject

Parameters

Return Value

Type: System.Windows.DependencyObject

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

ExtensionMethods Members

FindCommonAncestor Overload

Microsoft.VisualStudio.PlatformUI Namespace