title: Combobox ItemsSource through objectdataprovider by passing in a method parameter
body: <p>I want to populate a combobox control items from an object data provider. The object data provider calls a method on my custom class to get the list of items.</p>
  
  <p>However the method on my custom class expects a parameter before it can return list of items back. I am not sure how to do it.</p>
  
  <p>Here is my attempt:</p>
  
  <p>Object Data Provider declaration:</p>
  
  <pre><code>&lt;ObjectDataProvider x:Key="dataFromEnum" ObjectType="{x:Type ns:MyDataProvider}" MethodName="GetData"&gt;
              &lt;ObjectDataProvider.MethodParameters&gt;
                  &lt;sys:String&gt;String.Empty&lt;/sys:String&gt;
              &lt;/ObjectDataProvider.MethodParameters&gt;
          &lt;/ObjectDataProvider&gt;
  </code></pre>
  
  <p>ComboBox declaration:</p>
  
  <pre><code>&lt;ComboBox Name="combobox" ItemsSource="{StaticResource dataFromEnum}" Tag="{Binding Path=Name}" /&gt;
  </code></pre>
  
  <p>So as you can see the combo box's Tag property is bound to the Name property of the parent's data context. I want to pass that Name property to the object data provider. I am not sure how to pass the data into the object data provider while requesting data from it.</p>
  
  <p>Please advise.</p>
  
  <p>Thanks.</p>