Calculates the position of a
System.Windows.Controls.Primitives.Popup so that the specified point in the Popup matches the specified point of a FrameworkElement.
'Declaration
Public Overloads Shared Function TestPosition( _
ByVal As Popup, _
ByVal As Anchor, _
ByVal As FrameworkElement, _
ByVal As Anchor, _
ByVal As Double, _
ByVal As Double _
) As Point
'Usage
Dim popup As Popup
Dim popupAnchor As Anchor
Dim element As FrameworkElement
Dim elementAnchor As Anchor
Dim overlapHorizontal As Double
Dim overlapVertical As Double
Dim value As Point
value = PopupUtil.TestPosition(popup, popupAnchor, element, elementAnchor, overlapHorizontal, overlapVertical)
Parameters
- popup
- The popup to position.
- popupAnchor
- An Anchor value specifying the point in the Popup.
- element
- The System.Windows.FrameworkElement to use as reference.
- elementAnchor
- An Anchor value specifying the point in the FrameworkElement.
- overlapHorizontal
- The horizontal overlap between the elements (used for corner matching's).
- overlapVertical
- The vertical overlap between the elements (used for corner matching's).
Return Value
The absolute point where the popup would be located
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2