[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1ZoomPanel.SetScrollLocation

SetScrollLocation Method

SetScrollLocation(Point, bool)

Sets the ScrollLocation and determines wheather use animation when change ScrollLocation.

Declaration
public void SetScrollLocation(Point scrollLocation, bool useAnimation = false)
Parameters
Type Name Description
Point scrollLocation

The scroll location.

bool useAnimation

true to use animation; otherwise, false.

Examples

The following code example shows how to use this method.

This code example is part of a larger example provided for the AnimationStartingEventArgs class.

class GcZoomAnimationDemo : Form
{
	private Button _scrollLeftBtn = new Button();
	private GcZoom _gcZoom1 = new GcZoom();

	public GcZoomAnimationDemo()
	{
		InitializeComponent();

		_gcZoom1.Target = this;

		_scrollLeftBtn.Click += _scrollLeftBtn_Click;
	}

	void _scrollLeftBtn_Click(object sender, EventArgs e)
	{
		_gcZoom1.SetScrollLocation(new Point(0, 0), true);
	}

	private void InitializeComponent()
	{
		this._scrollLeftBtn.Location = new System.Drawing.Point(12, 50);
		this._scrollLeftBtn.Size = new System.Drawing.Size(260, 30);
		this._scrollLeftBtn.Text = "Scroll Left";
		this.Controls.Add(this._scrollLeftBtn);
	}
}
Class GcZoomAnimationDemo
	Inherits Form
	Private _scrollLeftBtn As New Button()
	Private _gcZoom1 As New GcZoom()

	Public Sub New()
		InitializeComponent()

		_gcZoom1.Target = Me

		AddHandler _scrollLeftBtn.Click, AddressOf _scrollLeftBtn_Click
	End Sub

	Private Sub _scrollLeftBtn_Click(sender As Object, e As EventArgs)
		_gcZoom1.SetScrollLocation(New Point(0, 0), True)
	End Sub

	Private Sub InitializeComponent()
		Me._scrollLeftBtn.Location = New System.Drawing.Point(12, 50)
		Me._scrollLeftBtn.Size = New System.Drawing.Size(260, 30)
		Me._scrollLeftBtn.Text = "Scroll Left"
		Me.Controls.Add(Me._scrollLeftBtn)
	End Sub
End Class