[]
        
(Showing Draft Content)

C1.WPF.Extensions.MakeRelative

MakeRelative Method

MakeRelative(Popup, FrameworkElement, Func<List<AnchorMatching>>)

Makes the popup relative to another FrameworkElement.

Declaration
public static void MakeRelative(this Popup popup, FrameworkElement relativeElement, Func<List<AnchorMatching>> getLocations)
Public Shared Sub MakeRelative(popup As Popup, relativeElement As FrameworkElement, getLocations As Func(Of List(Of AnchorMatching)))
Parameters
Type Name Description
Popup popup

Popup to handle.

FrameworkElement relativeElement

Element used to locate the popup.

Func<List<AnchorMatching>> getLocations

Function that provides the ordered list of AnchorMatching defining the corners to bound of both elements.

MakeRelative(Popup, FrameworkElement, Func<List<AnchorMatching>>, Func<Point>, Func<Point>)

Makes the popup relative to another FrameworkElement.

Declaration
public static void MakeRelative(this Popup popup, FrameworkElement relativeElement, Func<List<AnchorMatching>> getLocations, Func<Point> getPosition, Func<Point> getReferencePosition)
Public Shared Sub MakeRelative(popup As Popup, relativeElement As FrameworkElement, getLocations As Func(Of List(Of AnchorMatching)), getPosition As Func(Of Point), getReferencePosition As Func(Of Point))
Parameters
Type Name Description
Popup popup

Popup to handle.

FrameworkElement relativeElement

Element used to locate the popup.

Func<List<AnchorMatching>> getLocations

Function that provides the ordered list of AnchorMatching defining the corners to bound of both elements.

Func<Point> getPosition

Function that retrieves the current position of the Popup.

Func<Point> getReferencePosition

Function that retrieves the current position of the reference element.