title: wpf binding to static resource
body: <p>So I have  aproblem with binding in WPF. I am trying to bind a DataGrid ComboBoxColumn with a static resource but with no luck. I know where the problem is but I'm not sure how to fix it.</p>
  
  <p>in XAML i have this:</p>
  
  <pre><code>&lt;local:MyClasificators x:Key="clList"&gt;&lt;/local:MyClasificators&gt;
  </code></pre>
  
  <p>and DataGridComboBoxColumn</p>
  
  <pre><code>&lt;DataTemplate&gt;
      &lt;ComboBox ItemsSource="{StaticResource clList}" DisplayMemberPath="Value"  &gt;&lt;/ComboBox&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>code for the source I'm binding:</p>
  
  <pre><code>public class MyClasificators:List&lt;KeyValuePair&lt;object, object&gt;&gt;
  {
      public void _MyClasificators(DataTable country)
      {
          foreach (DataRow row in country.Rows)
          {
              this.Add(new KeyValuePair&lt;object, object&gt;(row.ItemArray[0], row.ItemArray[1]));
          }
      }
  </code></pre>
  
  <p>And the code for passing the DataTable:</p>
  
  <pre><code>public void callMyClassificators(DataTable country)
  {
      MyClasificators clasif = new MyClasificators();
      clasif._MyClasificators(country);
  }
  </code></pre>
  
  <p>I know that most probably I just have to edit the Resource part, but I'm not sure how should I go about it?</p>