tags:

views:

10

answers:

0

Hello. I have a button element inside Viewport2DVisual3D element, but wpf does not execute the event. I am only able to execute the Viewport3D_MouseDown event (Button_Click_1). What am i doing wrong?

   <ModelVisual3D>
      <Viewport3D Margin="2,-18,-2,18" MouseDown="Viewport3D_MouseDown">
        [...]
         <Viewport2DVisual3D.Visual>
            <Canvas Name="myCanvas">
              <Button Click="Button_Click_1">click me</Button>
        [...]
      </Viewport2DVisual3D>
      <ModelVisual3D.Content>
         <Model3DGroup>
        [...]
      </ModelVisual3D.Content>
         </ModelVisual3D>
       </ContainerUIElement3D>
     </Viewport3D>