title: How to pass value to ObjectDataProvider.MethodParameters dynamically in runtime
body: <p>I wrote this code:</p>
  
  <pre><code>public class CustomData
  {
      public int F1 { get; set; }
      public int F2 { get; set; }
      public string F3 { get; set; }
  }
  
  
  public class RetrievCustomData : List&lt;CustomData&gt;
  {
      public RetrievCustomData GetSome(int i)
      {
          for (int j = 0; j &lt; i; j++)
          {
              CustomData cd = new CustomData();
              Random rnd = new Random();
              cd.F1 = j;
              cd.F2 = rnd.Next(i);
              cd.F3 = "nima";
              this.Add(cd);
          }
  
          return this;
      }
  }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;ObjectDataProvider x:Key="ADUsers" ObjectType="{x:Type src:RetrievCustomData}"
                  MethodName="GetSome"&gt;
          &lt;ObjectDataProvider.MethodParameters&gt;
              &lt;sys:Int32&gt;20&lt;/sys:Int32&gt;
          &lt;/ObjectDataProvider.MethodParameters&gt;
      &lt;/ObjectDataProvider&gt;
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>I want to pass my parameter (here is 20) value dynamically (get fron user). How I can do this?</p>