[]
Gets or sets a value indicating whether allow scroll the form by pan gesture.
public bool AllowPanScroll { get; set; }
Type | Description |
---|---|
bool | true if allow scroll the form by pan gesture; otherwise, false.The default is true. |
The following code example shows how to use this property.
This code example is part of a larger example provided for the ScrollIndicatorMode property.
public class GcZoomScrollDemo : Form
{
private CheckBox _allowPanScrollCheckBox;
private GcZoom _gcZoom1 = new GcZoom();
public GcZoomScrollDemo()
{
InitializeComponent();
_gcZoom1.Target = this;
_allowPanScrollCheckBox.CheckedChanged += _allowPanScrollCheckBox_CheckedChanged;
}
void _allowPanScrollCheckBox_CheckedChanged(object sender, EventArgs e)
{
_gcZoom1.AllowPanScroll = _allowPanScrollCheckBox.Checked;
}
private void InitializeComponent()
{
_allowPanScrollCheckBox = new CheckBox();
_allowPanScrollCheckBox.Text = "AllowPanScroll";
this.Controls.Add(_allowPanScrollCheckBox);
}
}
Public Class GcZoomScrollDemo
Inherits Form
Private _allowPanScrollCheckBox As CheckBox
Private _gcZoom1 As New GcZoom()
Public Sub New()
InitializeComponent()
_gcZoom1.Target = Me
AddHandler _allowPanScrollCheckBox.CheckedChanged, AddressOf _allowPanScrollCheckBox_CheckedChanged
End Sub
Private Sub _allowPanScrollCheckBox_CheckedChanged(sender As Object, e As EventArgs)
_gcZoom1.AllowPanScroll = _allowPanScrollCheckBox.Checked
End Sub
Private Sub InitializeComponent()
_allowPanScrollCheckBox = New CheckBox()
_allowPanScrollCheckBox.Text = "AllowPanScroll"
Me.Controls.Add(_allowPanScrollCheckBox)
End Sub
End Class