How to Enable Touch?

Jan 29, 2014 at 4:14 PM

Is there an example for enabling Touch? Is all I need to do set IsManipulationEnabled to true on the Helix3DViewPort?

Jan 29, 2014 at 7:44 PM
Touch should be enabled by default. The CameraController class sets IsManipulationEnabled = true
Jan 29, 2014 at 7:50 PM
OK. It didn't seem to be for me. Here's my code:
<StackPanel Name="previewPanel" Margin="450,0,0,0" Width="430" Height="580">
     <HelixToolkit:HelixViewport3D x:Name="modelPreview" Width="430" Height="580" ZoomExtentsWhenLoaded="True" ModelUpDirection="0,1,0">
                            <PerspectiveCamera LookDirection="0,0,-1" UpDirection="0,1,0"/>
                        <HelixToolkit:DefaultLights />
                        <ModelVisual3D x:Name="model3D"/>                                                
This didn't respond to Touch at all. Then I tried setting IsManipulationEnabled="True" on the HelixViewport3D and that caused it to have some response to Touch, but it still wasn't usable. I'm sure I'm doing something wrong, but I have no idea what. I'm testing the Touch on a Windows 8.1 Touchscreen laptop.
Jan 29, 2014 at 7:59 PM
Is touch event handling working in the examples? Try the "SimpleDemo".
The examples are working with touch events on my Windows 8.1 machine (one finger to rotate, two fingers to pan and pinch to zoom).
Your code looks ok. Are you loading a really big model? Try to replace the ModelVisual3D with a simple cube visual.
Jan 29, 2014 at 8:07 PM
I will try the SimpleDemo and replacing the ModelVisual3D. In this case it is a fairly big model. Will it not work with big models?
Jan 29, 2014 at 9:54 PM
I replaced my ModelVisual3D with a Teapot and the Touch worked great. Will Touch not work on bigger models?
Feb 2, 2014 at 12:14 PM
I have seen similar behaviour, but don't know what causes this.
The ManipulationStarted and ManipulationDelta events are used the same way as MouseDown and MouseMove.