I (literally) want to catch a framework element using NUI of Kinect. Assuming that I have an ellipse on my Grid (or Canvas), I should be able to pick an ellipse using my program.
In order to do this, I thought that I have to determine the exact position of the element, like Transform.Position
in Unity, but I couldn't find such a thing in WPF.
Here is my XAML code,
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<my:KinectSensorChooser HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="kinectSensorChooser1" />
<my:KinectColorViewer Stretch="Fill" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="kinectColorViewer1" Kinect="{Binding Path=Kinect, ElementName=kinectSensorChooser1}" />
<Ellipse Height="114" Name="ellipse1" Stroke="Black" Fill="Black" VerticalAlignment="Top" Width="120" />
</Grid>
So my question is about finding the that element on the Grid. Having a Cursor or any element that represents the user's hand is not a problem. But after that, I'll have to detect the collision between my cursor and these elements and that the part that troubles me. An event like ElementHover or ElementPicked would also help but i guess i'm gonna have to write something like that myself.
By the way, it's about an "Engineering Education Software" project that aims to develop virtual environments for engineering exercises like expensive or dangerous experiments.