# C1.WPF.Extensions

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Extensions" data-uid="C1.WPF.Extensions" class="text-break">Extensions Class
</h1>
  <div class="markdown level0 summary"><p>Class that provides static extension methods for several other classes.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">Extensions</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.html">C1.WPF</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.4.6.2.dll</h6>
  <h5 id="C1_WPF_Extensions_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public static class Extensions</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Module Extensions</code></pre>
  </div>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_WPF_Extensions_C1TransformToVisual_System_Windows_UIElement_System_Windows_UIElement_" data-uid="C1.WPF.Extensions.C1TransformToVisual(System.Windows.UIElement,System.Windows.UIElement)">
          <a class="xref" href="C1.WPF.Extensions.C1TransformToVisual.html#C1_WPF_Extensions_C1TransformToVisual_System_Windows_UIElement_System_Windows_UIElement_">C1TransformToVisual(UIElement, UIElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a transform object that can be used to transform coordinates from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a> to the specified object.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Contains_System_Windows_Rect_System_Windows_Rect_" data-uid="C1.WPF.Extensions.Contains(System.Windows.Rect,System.Windows.Rect)">
          <a class="xref" href="C1.WPF.Extensions.Contains.html#C1_WPF_Extensions_Contains_System_Windows_Rect_System_Windows_Rect_">Contains(Rect, Rect)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines if the one rectangular region is entirely contained within another structure.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_ContainsAny__1_System_Collections_Generic_List___0____0___" data-uid="C1.WPF.Extensions.ContainsAny``1(System.Collections.Generic.List{``0},``0[])">
          <a class="xref" href="C1.WPF.Extensions.ContainsAny.html#C1_WPF_Extensions_ContainsAny__1_System_Collections_Generic_List___0____0___">ContainsAny&lt;T&gt;(List&lt;T&gt;, params T[])</a>
        </td>
        <td class="markdown level1 summary"><p>Determines whether the specified list contains any of the following values.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Deflate_System_Windows_Rect__System_Windows_Thickness_" data-uid="C1.WPF.Extensions.Deflate(System.Windows.Rect@,System.Windows.Thickness)">
          <a class="xref" href="C1.WPF.Extensions.Deflate.html#C1_WPF_Extensions_Deflate_System_Windows_Rect__System_Windows_Thickness_">Deflate(ref Rect, Thickness)</a>
        </td>
        <td class="markdown level1 summary"><p>Deflates a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.rect">Rect</a> structure by specified amount.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Distance_System_Windows_Point_System_Windows_Point_" data-uid="C1.WPF.Extensions.Distance(System.Windows.Point,System.Windows.Point)">
          <a class="xref" href="C1.WPF.Extensions.Distance.html#C1_WPF_Extensions_Distance_System_Windows_Point_System_Windows_Point_">Distance(Point, Point)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the distance between the two points</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_FindParent__1_System_Windows_FrameworkElement_" data-uid="C1.WPF.Extensions.FindParent``1(System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.Extensions.FindParent.html#C1_WPF_Extensions_FindParent__1_System_Windows_FrameworkElement_">FindParent&lt;T&gt;(FrameworkElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Finds the first parent of a given type for a particular FrameworkElement</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_GetAbsoluteUri_System_String_" data-uid="C1.WPF.Extensions.GetAbsoluteUri(System.String)">
          <a class="xref" href="C1.WPF.Extensions.GetAbsoluteUri.html#C1_WPF_Extensions_GetAbsoluteUri_System_String_">GetAbsoluteUri(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the absolute <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.uri">Uri</a> from a string that may represent relative or absolute Uri.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_GetAllParents_System_Windows_FrameworkElement_" data-uid="C1.WPF.Extensions.GetAllParents(System.Windows.FrameworkElement)">
          <a class="xref" href="C1.WPF.Extensions.GetAllParents.html#C1_WPF_Extensions_GetAllParents_System_Windows_FrameworkElement_">GetAllParents(FrameworkElement)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns all the parents in the visual tree</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_GetVisualStateGroup_System_Windows_FrameworkElement_System_String_" data-uid="C1.WPF.Extensions.GetVisualStateGroup(System.Windows.FrameworkElement,System.String)">
          <a class="xref" href="C1.WPF.Extensions.GetVisualStateGroup.html#C1_WPF_Extensions_GetVisualStateGroup_System_Windows_FrameworkElement_System_String_">GetVisualStateGroup(FrameworkElement, string)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the VisualStateGroup with the given name, looking up the visual tree</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Inflate_System_Windows_Rect__System_Double_System_Double_" data-uid="C1.WPF.Extensions.Inflate(System.Windows.Rect@,System.Double,System.Double)">
          <a class="xref" href="C1.WPF.Extensions.Inflate.html#C1_WPF_Extensions_Inflate_System_Windows_Rect__System_Double_System_Double_">Inflate(ref Rect, double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Enlarges a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.rect">Rect</a> structure by the specified amount.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Inflate_System_Windows_Rect__System_Double_System_Double_System_Double_System_Double_" data-uid="C1.WPF.Extensions.Inflate(System.Windows.Rect@,System.Double,System.Double,System.Double,System.Double)">
          <a class="xref" href="C1.WPF.Extensions.Inflate.html#C1_WPF_Extensions_Inflate_System_Windows_Rect__System_Double_System_Double_System_Double_System_Double_">Inflate(ref Rect, double, double, double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Enlarges a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.rect">Rect</a> structure by the specified amount.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_IntersectsWith_System_Windows_Rect_System_Windows_Rect_" data-uid="C1.WPF.Extensions.IntersectsWith(System.Windows.Rect,System.Windows.Rect)">
          <a class="xref" href="C1.WPF.Extensions.IntersectsWith.html#C1_WPF_Extensions_IntersectsWith_System_Windows_Rect_System_Windows_Rect_">IntersectsWith(Rect, Rect)</a>
        </td>
        <td class="markdown level1 summary"><p>Determines if this rectangle intersects with rect.</p>
</td>
      </tr>
      <tr>
        <td 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}})">
          <a class="xref" href="C1.WPF.Extensions.MakeRelative.html#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;)</a>
        </td>
        <td 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>
</td>
      </tr>
      <tr>
        <td 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})">
          <a class="xref" href="C1.WPF.Extensions.MakeRelative.html#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;)</a>
        </td>
        <td 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>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Multiply_System_Windows_Media_Matrix_System_Windows_Media_Matrix_" data-uid="C1.WPF.Extensions.Multiply(System.Windows.Media.Matrix,System.Windows.Media.Matrix)">
          <a class="xref" href="C1.WPF.Extensions.Multiply.html#C1_WPF_Extensions_Multiply_System_Windows_Media_Matrix_System_Windows_Media_Matrix_">Multiply(Matrix, Matrix)</a>
        </td>
        <td class="markdown level1 summary"><p>Multiplies the left matrix by the right matrix.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Multiply_System_Windows_Media_Matrix_System_Windows_Media_Matrix__System_Windows_Media_Matrix__" data-uid="C1.WPF.Extensions.Multiply(System.Windows.Media.Matrix,System.Windows.Media.Matrix@,System.Windows.Media.Matrix@)">
          <a class="xref" href="C1.WPF.Extensions.Multiply.html#C1_WPF_Extensions_Multiply_System_Windows_Media_Matrix_System_Windows_Media_Matrix__System_Windows_Media_Matrix__">Multiply(Matrix, ref Matrix, out Matrix)</a>
        </td>
        <td class="markdown level1 summary"><p>Multiplies the left matrix by the right matrix,
returns the resulting matrix in the output parameter.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___" data-uid="C1.WPF.Extensions.SetBinding``1(System.Windows.FrameworkElement,System.Windows.DependencyProperty,``0,System.Linq.Expressions.Expression{System.Func{``0,System.Object}})">
          <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___">SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the binding if the dependency property has not been set previously and the style of the element don't set the property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___System_Windows_Data_IValueConverter_" data-uid="C1.WPF.Extensions.SetBinding``1(System.Windows.FrameworkElement,System.Windows.DependencyProperty,``0,System.Linq.Expressions.Expression{System.Func{``0,System.Object}},System.Windows.Data.IValueConverter)">
          <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___System_Windows_Data_IValueConverter_">SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;, IValueConverter)</a>
        </td>
        <td class="markdown level1 summary"><p>Sets the binding if the dependency property has not been set previously and the style of the element don't set the property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Transform_System_Numerics_Matrix3x2_System_Drawing_RectangleF_" data-uid="C1.WPF.Extensions.Transform(System.Numerics.Matrix3x2,System.Drawing.RectangleF)">
          <a class="xref" href="C1.WPF.Extensions.Transform.html#C1_WPF_Extensions_Transform_System_Numerics_Matrix3x2_System_Drawing_RectangleF_">Transform(Matrix3x2, RectangleF)</a>
        </td>
        <td class="markdown level1 summary"><p>Transforms the rectangle.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Transform_System_Numerics_Matrix3x2_System_Single_System_Single_" data-uid="C1.WPF.Extensions.Transform(System.Numerics.Matrix3x2,System.Single,System.Single)">
          <a class="xref" href="C1.WPF.Extensions.Transform.html#C1_WPF_Extensions_Transform_System_Numerics_Matrix3x2_System_Single_System_Single_">Transform(Matrix3x2, float, float)</a>
        </td>
        <td class="markdown level1 summary"><p>Transforms the point.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Transform_System_Numerics_Matrix3x2_System_Windows_Point_" data-uid="C1.WPF.Extensions.Transform(System.Numerics.Matrix3x2,System.Windows.Point)">
          <a class="xref" href="C1.WPF.Extensions.Transform.html#C1_WPF_Extensions_Transform_System_Numerics_Matrix3x2_System_Windows_Point_">Transform(Matrix3x2, Point)</a>
        </td>
        <td class="markdown level1 summary"><p>Transforms the point.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Extensions_Transform_System_Windows_Media_Matrix_System_Double_System_Double_" data-uid="C1.WPF.Extensions.Transform(System.Windows.Media.Matrix,System.Double,System.Double)">
          <a class="xref" href="C1.WPF.Extensions.Transform.html#C1_WPF_Extensions_Transform_System_Windows_Media_Matrix_System_Double_System_Double_">Transform(Matrix, double, double)</a>
        </td>
        <td class="markdown level1 summary"><p>Transforms a point by this matrix.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
