locked
Add event to 3d model RRS feed

  • Question

  • Hi!
    I'm working with expression blend in a 3d project. I have loaded a 3d model in my project with 2 GeometryModel. How can I add GeometryModel3D click event? I only can add click event in Viewport3D?

     
                                   ....
                                    <Model3DGroup x:Name="Center" >
                                        <GeometryModel3D x:Name="CenterG" />
                                    </Model3DGroup>
                                    <Model3DGroup x:Name="Cube" >
                                        <GeometryModel3D x:Name="CubeG"/>
                                    </Model3DGroup>
                                </Model3DGroup>
                            </Model3DGroup>
                        </ModelVisual3D.Content>
                    </ModelVisual3D>
                </Viewport3D>

    if i have:

    private void ZAM3DViewbox_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
            {
                Viewbox vbox = (Viewbox)sender;
                ....
                Can I obtain here the GeometryModel3D reference? how?

    thanks  

    sign
    Friday, November 27, 2009 2:09 AM