# C1.Win.TouchToolKit.C1ZoomPanel.SetScrollLocation

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_TouchToolKit_C1ZoomPanel_SetScrollLocation_" data-uid="C1.Win.TouchToolKit.C1ZoomPanel.SetScrollLocation*">SetScrollLocation Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_TouchToolKit_C1ZoomPanel_SetScrollLocation_" data-uid="C1.Win.TouchToolKit.C1ZoomPanel.SetScrollLocation*"></a>
<h4 id="C1_Win_TouchToolKit_C1ZoomPanel_SetScrollLocation_System_Drawing_Point_System_Boolean_" data-uid="C1.Win.TouchToolKit.C1ZoomPanel.SetScrollLocation(System.Drawing.Point,System.Boolean)">SetScrollLocation(Point, bool)</h4>
<div class="markdown level1 summary"><p>Sets the <a class="xref" href="C1.Win.TouchToolKit.C1ZoomPanel.ScrollLocation.html#C1_Win_TouchToolKit_C1ZoomPanel_ScrollLocation">ScrollLocation</a> and determines wheather use animation when change <a class="xref" href="C1.Win.TouchToolKit.C1ZoomPanel.ScrollLocation.html#C1_Win_TouchToolKit_C1ZoomPanel_ScrollLocation">ScrollLocation</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void SetScrollLocation(Point scrollLocation, bool useAnimation = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub SetScrollLocation(scrollLocation As Point, Optional useAnimation As Boolean = False)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.point">Point</a></td>
      <td><span class="parametername">scrollLocation</span></td>
      <td><p>The scroll location.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">useAnimation</span></td>
      <td><p>true to use animation; otherwise, false.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_TouchToolKit_C1ZoomPanel_SetScrollLocation_System_Drawing_Point_System_Boolean__examples">Examples</h5>
<p>
  The following code example shows how to use this method.
</p>
<p>
  This code example is part of a larger example provided for the <a class="xref" href="C1.Win.TouchToolKit.AnimationStartingEventArgs.html">AnimationStartingEventArgs</a> class.
</p>
<pre><code class="lang-csharp">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);
	}
}</code></pre>
<pre><code class="lang-csharp">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</code></pre>

</div>
