Live Chat Icon For mobile
Live Chat Icon

How to pass a parameter to a function using ObjectDataProvider ?

Platform: WPF| Category: DataBinding

A parameter can be passed to a function using the ‘MethodParameters’ of the ‘ObjectDataProvider’ class.

The following XAML code snippet demonstrates how to pass parameters to a function using an ObjectDataProvider.

[XAML]

<ObjectDataProvider ObjectInstance='{StaticResource odp1}' MethodName='WeightOnPlanet' x:Key='odp2?>
<ObjectDataProvider.MethodParameters>
<system:Double>95</system:Double>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.