Bind the value of a parameter in an ObjectDataProvider in WPF

Posted by Andrei Rinea on Stack Overflow See other posts from Stack Overflow or by Andrei Rinea
Published on 2010-06-02T09:07:21Z Indexed on 2010/06/02 9:14 UTC
Read the original article Hit count: 338

I would like to be able to be doing this :

    <ObjectDataProvider x:Key="dataProvider"
                        ObjectInstance="uiRoot:App.Current.Controller" 
                        MethodName="GetMyViewModel">
        <ObjectDataProvider.MethodParameters>
            <system:Int32>{Binding Id}</system:Int32>
        </ObjectDataProvider.MethodParameters>
    </ObjectDataProvider>

The emphasis being on

            <system:Int32>{Binding Id}</system:Int32>

I can't get around this. Any ideas? :(

© Stack Overflow or respective owner

Related posts about wpf

Related posts about databinding