# C1.WPF.Extensions.MakeRelative

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Extensions_MakeRelative_" data-uid="C1.WPF.Extensions.MakeRelative*">MakeRelative Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Extensions_MakeRelative_" data-uid="C1.WPF.Extensions.MakeRelative*"></a>
<h4 id="C1_WPF_Extensions_MakeRelative_System_Windows_Controls_Primitives_Popup_System_Windows_FrameworkElement_System_Func_System_Collections_Generic_List_C1_WPF_AnchorMatching___" data-uid="C1.WPF.Extensions.MakeRelative(System.Windows.Controls.Primitives.Popup,System.Windows.FrameworkElement,System.Func{System.Collections.Generic.List{C1.WPF.AnchorMatching}})">MakeRelative(Popup, FrameworkElement, Func&lt;List&lt;AnchorMatching&gt;&gt;)</h4>
<div class="markdown level1 summary"><p>Makes the popup relative to another <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void MakeRelative(this Popup popup, FrameworkElement relativeElement, Func&lt;List&lt;AnchorMatching&gt;&gt; getLocations)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub MakeRelative(popup As Popup, relativeElement As FrameworkElement, getLocations As Func(Of List(Of AnchorMatching)))</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.popup">Popup</a></td>
      <td><span class="parametername">popup</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.popup">Popup</a> to handle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></td>
      <td><span class="parametername">relativeElement</span></td>
      <td><p>Element used to locate the popup.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="C1.WPF.AnchorMatching.html">AnchorMatching</a>&gt;&gt;</td>
      <td><span class="parametername">getLocations</span></td>
      <td><p>Function that provides the ordered list of <a class="xref" href="C1.WPF.AnchorMatching.html">AnchorMatching</a> defining the corners to bound of both elements.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_WPF_Extensions_MakeRelative_" data-uid="C1.WPF.Extensions.MakeRelative*"></a>
<h4 id="C1_WPF_Extensions_MakeRelative_System_Windows_Controls_Primitives_Popup_System_Windows_FrameworkElement_System_Func_System_Collections_Generic_List_C1_WPF_AnchorMatching___System_Func_System_Windows_Point__System_Func_System_Windows_Point__" data-uid="C1.WPF.Extensions.MakeRelative(System.Windows.Controls.Primitives.Popup,System.Windows.FrameworkElement,System.Func{System.Collections.Generic.List{C1.WPF.AnchorMatching}},System.Func{System.Windows.Point},System.Func{System.Windows.Point})">MakeRelative(Popup, FrameworkElement, Func&lt;List&lt;AnchorMatching&gt;&gt;, Func&lt;Point&gt;, Func&lt;Point&gt;)</h4>
<div class="markdown level1 summary"><p>Makes the popup relative to another <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void MakeRelative(this Popup popup, FrameworkElement relativeElement, Func&lt;List&lt;AnchorMatching&gt;&gt; getLocations, Func&lt;Point&gt; getPosition, Func&lt;Point&gt; getReferencePosition)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">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))</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.popup">Popup</a></td>
      <td><span class="parametername">popup</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.popup">Popup</a> to handle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></td>
      <td><span class="parametername">relativeElement</span></td>
      <td><p>Element used to locate the popup.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="C1.WPF.AnchorMatching.html">AnchorMatching</a>&gt;&gt;</td>
      <td><span class="parametername">getLocations</span></td>
      <td><p>Function that provides the ordered list of <a class="xref" href="C1.WPF.AnchorMatching.html">AnchorMatching</a> defining the corners to bound of both elements.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.point">Point</a>&gt;</td>
      <td><span class="parametername">getPosition</span></td>
      <td><p>Function that retrieves the current position of the Popup.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.point">Point</a>&gt;</td>
      <td><span class="parametername">getReferencePosition</span></td>
      <td><p>Function that retrieves the current position of the reference element.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
