07-05-2017, 07:48 PM
I've been studying the difference between the working example and my code, which doesn't work.
I have a Viewport3D with the geometry in it and I have a canvas over it to draw regions of interest. The Canvas receives mouse events so I can draw outlines and highlight things of interest in the underlying Viewport. So it's probably eating the mouse events
So how do I bind to the canvas to collect mouse events from there? Thanks in advance!
I have a Viewport3D with the geometry in it and I have a canvas over it to draw regions of interest. The Canvas receives mouse events so I can draw outlines and highlight things of interest in the underlying Viewport. So it's probably eating the mouse events
Code:
<Grid>
<dxControls:DXViewportView Name="MainViewportView" PresentationType="DirectXImage" Margin="230,70,20,170" ClipToBounds="true">
<Viewport3D Name="MainViewport" >
</Viewport3D>
</dxControls:DXViewportView>
<cameras:TargetPositionCamera Name="Camera1" Grid.Column="0" Heading="15" Attitude="7" Bank="0" Distance="350" TargetPosition="0 0 0"
ShowCameraLight="Always"
TargetViewport3D="{Binding ElementName=MainViewport}"/>
<ab3d:MouseCameraController Name="MouseCameraController1" Grid.Column="0"
RotateCameraConditions="LeftMouseButtonPressed"
MoveCameraConditions="LeftMouseButtonPressed, ControlKey"
EventsSourceElement="{Binding ElementName=ViewportBorder}"
TargetCamera="{Binding ElementName=Camera1}"/>
<Canvas Name="ROIcnv" Background ="Transparent" Canvas.Top="0" Canvas.Left="0" Margin="230,70,20,170" MouseDown="ROIcnvMouseDown" MouseUp="ROIcnvMouseUp" MouseMove="ROIcnvMouseMove" ClipToBounds="True" MouseWheel="ROIcnvMouseWheel"/>So how do I bind to the canvas to collect mouse events from there? Thanks in advance!

