I'm not sure how to approach this or if it is even feasible. I am tracking a users hand position and have say their left hand's x and y position. What I would like to be able to do is dynamically load in some loose xaml code which has say a square on a canvas. The position of the square would be bound to the x and y of the user's hand.
Is this possible? And if so, some pointers on where to begin?
DataTemplate
and Trigger
are what you're looking for.
Data Templating Overview on MSDN
Really good example on Code Project
Basically you'll want to create a DataTemplate
for your Input and add Triggers for your X & Y Attributes so that you can move the Canvas
so the right Location.
This will also support a dynamic amount of input (1,2,3,etc hands).
Good luck!