Binding WPF GridViewColumn to method with parameter
<p>I am trying to bind <code>GridViewColumn</code> to a method with parameter.  </p>

<p>My current XAML looks like this:</p>

<pre><code>&lt;ListView Margin="10" ItemsSource="{DynamicResource RemoteAgents}" Name="lvRemoteAgents" DataContext=""&gt;
        &lt;ListView.View&gt;
            &lt;GridView&gt;
                &lt;GridViewColumn Header="ID" DisplayMemberBinding="{Binding Value.ID}" /&gt;
                &lt;GridViewColumn Header="Name" DisplayMemberBinding="{Binding Value.name}" /&gt;
                &lt;GridViewColumn Header="Type" DisplayMemberBinding="{Binding Value.type}" /&gt;
            &lt;/GridView&gt;
        &lt;/ListView.View&gt;
    &lt;/ListView&gt;
</code></pre>

<p>ID, name and types are predefined properties of the ItemSource class.
These properties are actually fields of the JSON structure. So instead of binding to the properties I want to access JSON field by the field name. In pseudo-code I would look like this:</p>

<pre><code>   &lt;ListView Margin="10" ItemsSource="{DynamicResource RemoteAgents}" Name="lvRemoteAgents" DataContext=""&gt;
        &lt;ListView.View&gt;
            &lt;GridView&gt;
                &lt;GridViewColumn Header="ID" DisplayMemberBinding="{Binding Value.GetValue('ID')}" /&gt;
                &lt;GridViewColumn Header="Name" DisplayMemberBinding="{Binding Value.GetValue('name')}" /&gt;
                &lt;GridViewColumn Header="Type" DisplayMemberBinding="{Binding Value.GetValue('type')}" /&gt;
            &lt;/GridView&gt;
        &lt;/ListView.View&gt;
    &lt;/ListView&gt;
</code></pre>

<p>I defined <b>ObjectDataProvider</b> as </p>

<pre><code>&lt;ObjectDataProvider x:Key="GetValue"
        ObjectType="{x:Type local:RemoteAgent}"
        MethodName="GetField"&gt;
        &lt;ObjectDataProvider.MethodParameters&gt;
            &lt;system:String&gt;empty&lt;/system:String&gt;
        &lt;/ObjectDataProvider.MethodParameters&gt;
    &lt;/ObjectDataProvider&gt;
</code></pre>

<p>And now I bind to the <b>OjbectDataProvider</b> as follows:</p>

<pre><code>&lt;GridViewColumn Header="ID" DisplayMemberBinding="{Binding Source={StaticResource GetValue}, BindsDirectlyToSource=True, Mode=OneWayToSource}" /&gt;
</code></pre>

<p>My problem is how to pass parameter to GetValue function.</p>