I want to draw a set of 3D-Cubes, each Cube should display a name and also should have its own event handler when the cube is selected.
Is it possible to implement it using code behind or xaml binding?
I want to draw a set of 3D-Cubes, each Cube should display a name and also should have its own event handler when the cube is selected.
Is it possible to implement it using code behind or xaml binding?
To draw a 3D cube from code behind I would use the Helix3D toolkit CubeVisual3D. However if you want to stick with stock WPF 3D elements it is fairly simple to implement.
start here to Learn about Text in 3D enviroments http://www.codeproject.com/Articles/33893/WPF-Creation-of-Text-Labels-for-3D-Scene which will guide you through two different approaches to adding Text to a 3D image and I find very helpful.
For a cube Just use a RectangleVisual3D object Something like this.
Too add the event handler I believe you must add the Handler to the Viewport3D. Something of this nature should work.
Then Add this function
Then Add in the Event Handlers