# C1.Win.TouchToolKit.ImageItem.ZoomFactor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_TouchToolKit_ImageItem_ZoomFactor_" data-uid="C1.Win.TouchToolKit.ImageItem.ZoomFactor*">ZoomFactor Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_TouchToolKit_ImageItem_ZoomFactor_" data-uid="C1.Win.TouchToolKit.ImageItem.ZoomFactor*"></a>
<h4 id="C1_Win_TouchToolKit_ImageItem_ZoomFactor" data-uid="C1.Win.TouchToolKit.ImageItem.ZoomFactor">ZoomFactor</h4>
<div class="markdown level1 summary"><p>Gets or sets a value indicate how much the <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.ZoomFactor.html#C1_Win_TouchToolKit_C1MultiScaleImage_ZoomFactor">ZoomFactor</a> is to display <a class="xref" href="C1.Win.TouchToolKit.ImageItem.Image.html#C1_Win_TouchToolKit_ImageItem_Image">Image</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public float ZoomFactor { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property ZoomFactor As Single</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a> value that indicate how much the <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.ZoomFactor.html#C1_Win_TouchToolKit_C1MultiScaleImage_ZoomFactor">ZoomFactor</a> is to display <a class="xref" href="C1.Win.TouchToolKit.ImageItem.Image.html#C1_Win_TouchToolKit_ImageItem_Image">Image</a>.
The default is <b>2f</b>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_TouchToolKit_ImageItem_ZoomFactor_examples">Examples</h5>
<p>
  The following code example shows how to use this property. 
</p>
<p>
  This code example is part of a larger example provided for the <a class="xref" href="C1.Win.TouchToolKit.ImageItem.html">ImageItem</a> class.
</p>
<pre><code class="lang-csharp">public class GcMultiScaleImageDemo : Form
{
	private GcZoom _gcZoomObj;
	private GcMultiScaleImage _gcmultiScaleImage;

	public GcMultiScaleImageDemo()
	{
		InitializeComponent();

		_gcZoomObj = new GcZoom();
		_gcZoomObj.Target = this;
	}

	private void InitializeComponent()
	{
		ImageItem item1 = new ImageItem();
		item1.Image = Image.FromFile(@"C:\image1.jpg");
		item1.ZoomFactor = 1.5f;

		ImageItem item2 = new ImageItem();
		item2.Image = Image.FromFile(@"C:\image2.jpg");
		item2.ZoomFactor = 2f;

		_gcmultiScaleImage = new GcMultiScaleImage();
		_gcmultiScaleImage.Location = new Point(20, 20);
		_gcmultiScaleImage.Size = new Size(100, 100);
		_gcmultiScaleImage.BackColor = Color.Red;

		_gcmultiScaleImage.ZoomFactor = 1f;
		_gcmultiScaleImage.Image = Image.FromFile(@"C:\image.jpg");
		_gcmultiScaleImage.SizeMode = PictureBoxSizeMode.StretchImage;

		_gcmultiScaleImage.Images.Add(item1);
		_gcmultiScaleImage.Images.Add(item2);

		this.Controls.Add(_gcmultiScaleImage);
	}
}</code></pre>
<pre><code class="lang-csharp">Public Class GcMultiScaleImageDemo
	Inherits Form
	Private _gcZoomObj As GcZoom
	Private _gcmultiScaleImage As GcMultiScaleImage

	Public Sub New()
		InitializeComponent()

		_gcZoomObj = New GcZoom()
		_gcZoomObj.Target = Me
	End Sub

	Private Sub InitializeComponent()
		Dim item1 As New ImageItem()
		item1.Image = Image.FromFile("C:\image1.jpg")
		item1.ZoomFactor = 1.5F

		Dim item2 As New ImageItem()
		item2.Image = Image.FromFile("C:\image2.jpg")
		item2.ZoomFactor = 2.0F

		_gcmultiScaleImage = New GcMultiScaleImage()
		_gcmultiScaleImage.Location = New Point(20, 20)
	 	_gcmultiScaleImage.Size = New Size(100, 100)
	 	_gcmultiScaleImage.BackColor = Color.Red

	 	_gcmultiScaleImage.ZoomFactor = 1.0F
	 	_gcmultiScaleImage.Image = Image.FromFile("C:\image.jpg")
	 	_gcmultiScaleImage.SizeMode = PictureBoxSizeMode.StretchImage

	 	_gcmultiScaleImage.Images.Add(item1)
		_gcmultiScaleImage.Images.Add(item2)

	 	Me.Controls.Add(_gcmultiScaleImage)
	End Sub
End Class</code></pre>

<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>The assigned value is less than or equal to 1.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
