Place a control inside 3D object wpf
There are several tutorials that show you how to create 3d objects such as thisIntroduction to WPF 3D
. Moreover I could create the 3d objects in other applications and then import them with expression blend.
If my 3d object is 开发者_Python百科a cube for example how could I place a user control in one of the faces of the cube? When I imported my 3d object to my application expression blend created a viewport control. I was wondering if it is possible to place a control inside that object such as a button. I have tried placing the button inside that viewport and it does not work. Is it possible to place a user control inside a 3d object?
You can use Viewport2dVisual3d
class.
This class allows live interactive 2D content to be directly mapped to a 3D surface.
You should break the mesh up to have a separate mesh for each face then use a Viewport2dVisual3d
for each face and add your control to that face.
精彩评论