views:

437

answers:

0

I am attempting to bind the position of a camera to the relative position of a mouse's position in a 3D environment.

Using an ObjectDataProvider I would imagine I can call this method and then bind to it, however, I'm not sure what to put in the ObjectDataProvider.MethodParameters, I'd like to reference the named Viewport3D from outside the UserControl.Resources, but...

Is what I'm trying to do even possible? Or is there a better way to go about doing this? I am trying to pull everything as I can out of the behind code and either use binding or make generic enough for other pieces to use..

<ObjectDataProvider MethodName="GetPosition" ObjectType="{x:Type Mouse}" x:Key="MousePosition">
        <ObjectDataProvider.MethodParameters>
            ***What would I put here, to reference a Viewport3D?***
        </ObjectDataProvider.MethodParameters>
    </ObjectDataProvider>