ComponentOne Basic Library for WPF and Silverlight
TestPosition(Popup,Anchor,FrameworkElement,Anchor,Double,Double) Method


C1.Silverlight Namespace > PopupUtil Class > TestPosition Method : TestPosition(Popup,Anchor,FrameworkElement,Anchor,Double,Double) Method
The popup to position.
An Anchor value specifying the point in the Popup.
The System.Windows.FrameworkElement to use as reference.
An Anchor value specifying the point in the FrameworkElement.
The horizontal overlap between the elements (used for corner matching's).
The vertical overlap between the elements (used for corner matching's).
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.
Syntax
'Declaration
 
Public Overloads Shared Function TestPosition( _
   ByVal popup As System.Windows.Controls.Primitives.Popup, _
   ByVal popupAnchor As Anchor, _
   ByVal element As System.Windows.FrameworkElement, _
   ByVal elementAnchor As Anchor, _
   ByVal overlapHorizontal As System.Double, _
   ByVal overlapVertical As System.Double _
) As System.Windows.Point
'Usage
 
Dim popup As System.Windows.Controls.Primitives.Popup
Dim popupAnchor As Anchor
Dim element As System.Windows.FrameworkElement
Dim elementAnchor As Anchor
Dim overlapHorizontal As System.Double
Dim overlapVertical As System.Double
Dim value As System.Windows.Point
 
value = PopupUtil.TestPosition(popup, popupAnchor, element, elementAnchor, overlapHorizontal, overlapVertical)
public static System.Windows.Point TestPosition( 
   System.Windows.Controls.Primitives.Popup popup,
   Anchor popupAnchor,
   System.Windows.FrameworkElement element,
   Anchor elementAnchor,
   System.double overlapHorizontal,
   System.double 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
See Also

Reference

PopupUtil Class
PopupUtil Members
Overload List