# C1.Win.TouchToolKit.C1MultiScaleImage

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Win_TouchToolKit_C1MultiScaleImage" data-uid="C1.Win.TouchToolKit.C1MultiScaleImage" class="text-break">C1MultiScaleImage Class
</h1>
  <div class="markdown level0 summary"><p>Represents a control which can display different images for different zoom factor of the control.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.marshalbyrefobject">MarshalByRefObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.component">Component</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a></div>
    <div class="level4"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.picturebox">PictureBox</a></div>
    <div class="level5"><span class="xref">C1MultiScaleImage</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.idroptarget">IDropTarget</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isynchronizeinvoke">ISynchronizeInvoke</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.iwin32window">IWin32Window</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.ibindablecomponent">IBindableComponent</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.icomponent">IComponent</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Win.TouchToolKit.html">C1.Win.TouchToolKit</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.TouchToolKit.10.dll</h6>
  <h5 id="C1_Win_TouchToolKit_C1MultiScaleImage_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[ToolboxBitmap(typeof(C1MultiScaleImage), &quot;MultiScaleImage.png&quot;)]
public class C1MultiScaleImage : PictureBox, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, ISupportInitialize</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;ToolboxBitmap(GetType(C1MultiScaleImage), &quot;MultiScaleImage.png&quot;)&gt;
Public Class C1MultiScaleImage
    Inherits PictureBox
    Implements IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, ISupportInitialize</code></pre>
  </div>
  <h5 id="C1_Win_TouchToolKit_C1MultiScaleImage_examples"><strong>Examples</strong></h5>
  <p>
  The following code example shows how to use the <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.html">C1MultiScaleImage</a> component. 
</p>
<p>
  You can copy the code to a exsit Windows Forms appliction. And set the form in the sample code as start form. 
</p>
<p>
  If you find a licenses error when run this code. Try to drag a <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.html">C1MultiScaleImage</a> component to a 
  any Form from tool box can generate the licenses information to this project.
</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>

  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_TouchToolKit_C1MultiScaleImage__ctor" data-uid="C1.Win.TouchToolKit.C1MultiScaleImage.#ctor">
          <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.-ctor.html#C1_Win_TouchToolKit_C1MultiScaleImage__ctor">C1MultiScaleImage()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.html">C1MultiScaleImage</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_TouchToolKit_C1MultiScaleImage_Images" data-uid="C1.Win.TouchToolKit.C1MultiScaleImage.Images">
          <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.Images.html#C1_Win_TouchToolKit_C1MultiScaleImage_Images">Images</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the a group of <a class="xref" href="C1.Win.TouchToolKit.ImageItem.html">ImageItem</a> that display specific image in specific zoom factor.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Win_TouchToolKit_C1MultiScaleImage_ZoomFactor" data-uid="C1.Win.TouchToolKit.C1MultiScaleImage.ZoomFactor">
          <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.ZoomFactor.html#C1_Win_TouchToolKit_C1MultiScaleImage_ZoomFactor">ZoomFactor</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the zoom factor of the control.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Win_TouchToolKit_C1MultiScaleImage_AboutBox" data-uid="C1.Win.TouchToolKit.C1MultiScaleImage.AboutBox">
          <a class="xref" href="C1.Win.TouchToolKit.C1MultiScaleImage.AboutBox.html#C1_Win_TouchToolKit_C1MultiScaleImage_AboutBox">AboutBox()</a>
        </td>
        <td class="markdown level1 summary"><p>Shows the product information window.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
