[]
        
(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)
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)
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.