Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 37 additions & 22 deletions uwp/Image-Editor/Zooming.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,101 @@
layout: post
title: Zooming in UWP Image Editor control | Syncfusion
description: Learn here all about Zooming support in Syncfusion UWP Image Editor (SfImageEditor) control and more.
platform: UWP
platform: uwp
control: SfImageEditor
documentation: ug
---

# Zooming in UWP Image Editor (SfImageEditor)
The following namespaces are required for zooming and panning in the SfImageEditor control:

* `Syncfusion.UI.Xaml.ImageEditor`
* `Syncfusion.UI.Xaml.ImageEditor.Enums`

The image editor control provides support to zoom and pan actions over an image. You can zoom in and zoom out the image in image editor control.
# Zooming in UWP Image Editor (SfImageEditor)

The following properties are used for zooming feature of the image editor control:
The image editor control provides support for zoom and pan actions over an image. You can zoom in and zoom out of the image in the image editor control.

* EnableZooming
The following properties are used for the zooming feature of the image editor control:

* PanningMode
* `EnableZooming`
* `PanningMode`

## Enable zooming

You can enable or disable the zooming functionality by setting the [`EnableZooming`](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.html#Syncfusion_UI_Xaml_ImageEditor_SfImageEditor_EnableZooming) value to true or false. By default, the `EnableZooming` value is set to true.
You can enable or disable the zooming functionality by setting the [`EnableZooming`](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.html#Syncfusion_UI_Xaml_ImageEditor_SfImageEditor_EnableZooming) property to `true` or `false`. By default, the `EnableZooming` property is set to `true`.

{% tabs %}

{% highlight XAML %}


xmlns:imageeditor="using:Syncfusion.UI.Xaml.ImageEditor"

<imageeditor:SfImageEditor x:Name="editor" EnableZooming="false"/>

{% endhighlight %}

{% highlight C# %}

editor.EnableZooming = false;

using Syncfusion.UI.Xaml.ImageEditor;

editor.EnableZooming = false;

{% endhighlight %}

{% endtabs %}

## Panning mode

The image editor control provides support for panning and allows to pan the image with two fingers or single finger by setting the [`PanningMode`](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.html#Syncfusion_UI_Xaml_ImageEditor_SfImageEditor_PanningMode).
The image editor control provides support for panning and allows you to pan the image with two fingers or a single finger by setting the [`PanningMode`](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.html#Syncfusion_UI_Xaml_ImageEditor_SfImageEditor_PanningMode).

The following properties are used for panning:
The following values are used for panning:

* `SingleFinger`: Zooms or pans the image with single finger, but shapes and text selection cannot be performed with this mode.
* `TwoFinger`: Zooms or pans the image with two finger. The shapes and text selection can be performed with this mode.
* `SingleFinger`: Zooms or pans the image with a single finger, but shapes and text selection cannot be performed with this mode.
* `TwoFinger`: Zooms or pans the image with two fingers. Shapes and text selection can be performed with this mode.

By default, the [`PanningMode`](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.html#Syncfusion_UI_Xaml_ImageEditor_SfImageEditor_PanningMode) value is set to `TwoFinger`.

{% tabs %}

{% highlight XAML %}

xmlns:imageeditor="using:Syncfusion.UI.Xaml.ImageEditor"

<imageeditor:SfImageEditor x:Name="editor" EnableZooming="true" PanningMode="TwoFinger"/>

{% endhighlight %}

{% highlight C# %}

editor.PanningMode = PanningMode.TwoFinger;
using Syncfusion.UI.Xaml.ImageEditor.Enums;

editor.PanningMode = PanningMode.TwoFinger;

{% endhighlight %}

{% endtabs %}

## Maximum zoom level

Zooming of the image can be restricted to certain level based on the value of the [`MaximumZoomLevel`](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.html#Syncfusion_UI_Xaml_ImageEditor_SfImageEditor_MaximumZoomLevel) property.
Zooming of the image can be restricted to a certain level based on the value of the [`MaximumZoomLevel`](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.ImageEditor.SfImageEditor.html#Syncfusion_UI_Xaml_ImageEditor_SfImageEditor_MaximumZoomLevel) property.

{% tabs %}

{% highlight XAML %}

<syncfusion:SfImageEditor x:Name="editor" MaximumZoomLevel="2">

</syncfusion:SfImageEditor>
xmlns:syncfusion="using:Syncfusion.UI.Xaml.ImageEditor"

<syncfusion:SfImageEditor x:Name="editor" MaximumZoomLevel="2">
</syncfusion:SfImageEditor>

{% endhighlight %}

{% highlight C# %}

SfImageEditor editor = new SfImageEditor();
editor.MaximumZoomLevel = 2;
using Syncfusion.UI.Xaml.ImageEditor;

SfImageEditor editor = new SfImageEditor();
editor.MaximumZoomLevel = 2;

{% endhighlight %}

Expand Down