I am attempting to use an ObjectDataProvider to call the GetPositition method of Mouse, but am getting this error:
System.Windows.Data Error: 34 : ObjectDataProvider: Failure trying to invoke method on type; Method='GetPosition'; Type='Mouse'; Error='No method was found with matching parameter signature.' MissingMethodException:'System.MissingMethodException: Method 'System.Windows.Input.Mouse.GetPosition' not found.
This is my code at the moment:
<ObjectDataProvider MethodName="GetPosition" ObjectType="{x:Type sys:Mouse}" x:Key="odp">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="local:TestType"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
with a simple binding:
{Binding Source={StaticResource odp}}
Why is it reporting not finding the Method no matter what I do?