[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1Zoom.AllowPinchZoom

AllowPinchZoom Property

AllowPinchZoom

Gets or sets a value indicating whether the form can perform gesture zoom.

Declaration
public bool AllowPinchZoom { get; set; }
Property Value
Type Description
bool

true if the form can perform gesture zoom; otherwise, false. The default is true.

Examples

The following code example shows how to enable/disable the gesture zoom.

public class GcZoomMiscDemo : Form
{
	private CheckBox _allowPinchZoomCheckBox;
	private GcZoom _gcZoom1 = new GcZoom();

	public GcZoomMiscDemo()
 	{
		InitializeComponent();

		_gcZoom1.Target = this;

		_allowPinchZoomCheckBox.CheckedChanged += _allowPinchZoomCheckBox_CheckedChanged;
	}

	void _allowPinchZoomCheckBox_CheckedChanged(object sender, EventArgs e)
	{
		_gcZoom1.AllowPinchZoom = _allowPinchZoomCheckBox.Checked;
	}

	private void InitializeComponent()
	{
		_allowPinchZoomCheckBox = new CheckBox();
		_allowPinchZoomCheckBox.Text = "AllowPinchZoom";
		_allowPinchZoomCheckBox.Location = new Point(20, 50);
		_allowPinchZoomCheckBox.Size = new Size(200, 20);
		this.Controls.Add(_allowPinchZoomCheckBox);
	}
}
Public Class GcZoomMiscDemo
	Inherits Form
	Private _allowPinchZoomCheckBox As CheckBox
	Private _gcZoom1 As New GcZoom()

	Public Sub New()
		InitializeComponent()

		_gcZoom1.Target = Me

		AddHandler _allowPinchZoomCheckBox.CheckedChanged, AddressOf _allowPinchZoomCheckBox_CheckedChanged
	End Sub

	Private Sub _allowPinchZoomCheckBox_CheckedChanged(sender As Object, e As EventArgs)
		_gcZoom1.AllowPinchZoom = _allowPinchZoomCheckBox.Checked
	End Sub

	Private Sub InitializeComponent()
		_allowPinchZoomCheckBox = New CheckBox()
		_allowPinchZoomCheckBox.Text = "AllowPinchZoom"
		_allowPinchZoomCheckBox.Location = New Point(20, 50)
		_allowPinchZoomCheckBox.Size = New Size(200, 20)
		Me.Controls.Add(_allowPinchZoomCheckBox)
	End Sub
End Class