# C1.Data.FilteredView-1.BindFilterKey

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Data_FilteredView_1_BindFilterKey_" data-uid="C1.Data.FilteredView`1.BindFilterKey*">BindFilterKey Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Data_FilteredView_1_BindFilterKey_" data-uid="C1.Data.FilteredView`1.BindFilterKey*"></a>
<h4 id="C1_Data_FilteredView_1_BindFilterKey_System_Windows_Data_Binding_" data-uid="C1.Data.FilteredView`1.BindFilterKey(System.Windows.Data.Binding)">BindFilterKey(Binding)</h4>
<div class="markdown level1 summary"><p>Binds the <a class="xref" href="C1.Data.FilteredView-1.FilterKey.html#C1_Data_FilteredView_1_FilterKey">FilterKey</a> property using the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.data.binding">Binding</a> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public FilteredView&lt;T&gt; BindFilterKey(Binding binding)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function BindFilterKey(binding As Binding) As FilteredView(Of T)</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.data.binding">Binding</a></td>
      <td><span class="parametername">binding</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.data.binding">Binding</a> object used to bind the <a class="xref" href="C1.Data.FilteredView-1.FilterKey.html#C1_Data_FilteredView_1_FilterKey">FilterKey</a>.
Use null to unbind the previously bound <a class="xref" href="C1.Data.FilteredView-1.FilterKey.html#C1_Data_FilteredView_1_FilterKey">FilterKey</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Data.FilteredView-1.html">FilteredView</a>&lt;T&gt;</td>
      <td><p>The same <a class="xref" href="C1.Data.FilteredView-1.html">FilteredView&lt;T&gt;</a> on which this method was called.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Data_FilteredView_1_BindFilterKey_" data-uid="C1.Data.FilteredView`1.BindFilterKey*"></a>
<h4 id="C1_Data_FilteredView_1_BindFilterKey_System_Object_System_String_" data-uid="C1.Data.FilteredView`1.BindFilterKey(System.Object,System.String)">BindFilterKey(object, string)</h4>
<div class="markdown level1 summary"><p>Binds the <a class="xref" href="C1.Data.FilteredView-1.FilterKey.html#C1_Data_FilteredView_1_FilterKey">FilterKey</a> property to a given <code class="paramref">path</code>
on a given <code class="paramref">source</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public FilteredView&lt;T&gt; BindFilterKey(object source, string path)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function BindFilterKey(source As Object, path As String) As FilteredView(Of T)</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.object">object</a></td>
      <td><span class="parametername">source</span></td>
      <td><p>The object to bind to. Cannot be null.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">path</span></td>
      <td><p>The property path to bind to.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Data.FilteredView-1.html">FilteredView</a>&lt;T&gt;</td>
      <td><p>The same <a class="xref" href="C1.Data.FilteredView-1.html">FilteredView&lt;T&gt;</a> on which this method was called.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.nullreferenceexception">NullReferenceException</a></td>
      <td><p><code class="paramref">source</code> is null.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
