SciChart WPF 3D Charts > ChartModifier3D API > Zooming and Panning > The PinchZoomModifier3D
The PinchZoomModifier3D

Zooming and Panning a Chart in SciChart3D is achieved by moving the SciChart3DSurface.Camera to a new location.

The article "The SciChart3DSurface Camera" goes into detail how this camera class works and how to manipulate it programatically to achieve various views.

If you want to add simple panning of the camera to the chart then you can do so using our ChartModifiers API. The PinchZoomModifier3D performs movement the camera forwards/backwards when the user pinches a touch screen giving the appearance of zooming the 3D world.


Declaring a PinchZoomModifier3D in XAML

Declaring an PinchZoomModifier3D is as simple as adding one to the SciChart3DSurface.ChartModifier property. This can be done as a single modifier, or as part of a ModifierGroup3D.


<s3D:SciChart3DSurface x:Name="scs" >
    <!-- XAxis, YAxis, RenderableSeries omitted for brevity -->       
            <!-- Add the PinchZoomModifier3D to the chart. Optional. add other modifiers -->
            <s3D:PinchZoomModifier3D ZoomScaleSensitivity="1"/>           
var sciChart3DSurface = new SciChart3DSurface();
// XAxis, YAxis, RenderableSeries omitted for brevity
var modifierGroup = new ModifierGroup3D();
modifierGroup.ChildModifiers.Add(new PinchZoomModifier3D () {
    IsEnabled = true,
    ZoomScaleSensitivity= 1f,
sciChart3DSurface.ChartModifier = modifierGroup;