# C1.Win.TouchToolKit.C1Magnify.GetEnableMagnifier

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_TouchToolKit_C1Magnify_GetEnableMagnifier_" data-uid="C1.Win.TouchToolKit.C1Magnify.GetEnableMagnifier*">GetEnableMagnifier Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_TouchToolKit_C1Magnify_GetEnableMagnifier_" data-uid="C1.Win.TouchToolKit.C1Magnify.GetEnableMagnifier*"></a>
<h4 id="C1_Win_TouchToolKit_C1Magnify_GetEnableMagnifier_System_Windows_Forms_Control_" data-uid="C1.Win.TouchToolKit.C1Magnify.GetEnableMagnifier(System.Windows.Forms.Control)">GetEnableMagnifier(Control)</h4>
<div class="markdown level1 summary"><p>Retrieves the <a class="xref" href="C1.Win.TouchToolKit.C1Magnify.html">C1Magnify</a> associated with the specified control or not.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool GetEnableMagnifier(Control control)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetEnableMagnifier(control As Control) As Boolean</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.windows.forms.control">Control</a></td>
      <td><span class="parametername">control</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.control">Control</a> for which to retrieve the <a class="xref" href="C1.Win.TouchToolKit.C1Magnify.html">C1Magnify</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</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.boolean">bool</a></td>
      <td><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the specified control will shows magnifier after press and hold; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_TouchToolKit_C1Magnify_GetEnableMagnifier_System_Windows_Forms_Control__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.C1Magnify.html">C1Magnify</a> class.
</p>
<pre><code class="lang-csharp">public class GcMagnifierDemo : Form
{
	private TextBox _magnifierTextBox;
	private GcMagnifier _gcMagnifierObj = new GcMagnifier();

	public GcMagnifierDemo()
	{
		InitializeComponent();

		// Enable GcMagnifier component to _firstTextBox.
		_gcMagnifierObj.SetEnableMagnifier(_magnifierTextBox, true);

		Console.WriteLine(_gcMagnifierObj.GetEnableMagnifier(_magnifierTextBox).ToString());
	}

	private void InitializeComponent()
	{
		_magnifierTextBox = new TextBox();
		_magnifierTextBox.Text = "This is a TextBox";
		_magnifierTextBox.Location = new Point(20, 20);
		_magnifierTextBox.Size = new Size(160, 20);
		this.Controls.Add(_magnifierTextBox);
	}
}</code></pre>
<pre><code class="lang-csharp">Public Class GcMagnifierDemo
	Inherits Form
	Private _magnifierTextBox As TextBox
	Private _gcMagnifierObj As New GcMagnifier()

	Public Sub New()
		InitializeComponent()

		' Enable GcMagnifier component to _firstTextBox.
		_gcMagnifierObj.SetEnableMagnifier(_magnifierTextBox, True)

		Console.WriteLine(_gcMagnifierObj.GetEnableMagnifier(_magnifierTextBox).ToString())
	End Sub

	Private Sub InitializeComponent()
		_magnifierTextBox = New TextBox()
		_magnifierTextBox.Text = "This is a TextBox"
		_magnifierTextBox.Location = New Point(20, 20)
		_magnifierTextBox.Size = New Size(160, 20)
		Me.Controls.Add(_magnifierTextBox)
	End Sub
End Class</code></pre>

</div>
