[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1ZoomPanel.AllowDoubleTapZoom

AllowDoubleTapZoom Property

AllowDoubleTapZoom

Gets or sets a value indicating whether allow double tap to zoom. ZoomFactor will change to 2f or MaxZoomFactor if it is less than 2f before double tap; otherwise, it will change to 1f.

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

true if allow double tap to zoom; otherwise, false. The default is false.

Examples

The following code example shows how to use this property.

This code example is part of a larger example provided for the AllowPinchZoom property.

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

	public GcZoomMiscDemo()
	{
		InitializeComponent();

		_gcZoom1.Target = this;

		_allowDoubleTapZoomCheckBox.CheckedChanged += _allowDoubleTapZoomCheckBox_CheckedChanged;
	}

	void _allowDoubleTapZoomCheckBox_CheckedChanged(object sender, EventArgs e)
	{
		_gcZoom1.AllowDoubleTapZoom = _allowDoubleTapZoomCheckBox.Checked;
	}

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

	Public Sub New()
		InitializeComponent()

		_gcZoom1.Target = Me

		AddHandler _allowDoubleTapZoomCheckBox.CheckedChanged, AddressOf _allowDoubleTapZoomCheckBox_CheckedChanged
	End Sub

	Private Sub _allowDoubleTapZoomCheckBox_CheckedChanged(sender As Object, e As EventArgs)
		_gcZoom1.AllowDoubleTapZoom = _allowDoubleTapZoomCheckBox.Checked
	End Sub

	Private Sub InitializeComponent()
		_allowDoubleTapZoomCheckBox = New CheckBox()
		_allowDoubleTapZoomCheckBox.Text = "AllowDoubleTapZoom"
		_allowDoubleTapZoomCheckBox.Location = New Point(20, 80)
		_allowDoubleTapZoomCheckBox.Size = New Size(200, 20)
		Me.Controls.Add(_allowDoubleTapZoomCheckBox)
	End Sub
End Class