Can WPF ObjectDataProvider invoke generic method?

616 Views Asked by At

Commonly known, ObjectDataProvider can invoke simple nongeneric methods like that

XAML:

<ObjectDataProvider x:Key="SimpleKey" MethodName="Nongeneric" ObjectType="{x:Type local:SomeClass}">
</ObjectDataProvider>

CodeBehind:

public static SomeClass
{
    public static void NongenericMethod()
    {
        // method body        
    }

    public static void GenericMethod<T>()
    {
        // method body
    }
}

Is it possible that ObjectDataProvider invokes generic method? Something like that:

<ObjectDataProvider x:Key="SimpleKey" MethodName="GenericMethod<local:OtherClass>" ObjectType="{x:Type local:SomeClass}">
</ObjectDataProvider>
0

There are 0 best solutions below