[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1Magnify.SetEnableMagnifier

SetEnableMagnifier Method

SetEnableMagnifier(Control, bool)

Associates C1Magnify with the specified control.

Declaration
public void SetEnableMagnifier(Control control, bool value)
Parameters
Type Name Description
Control control

The Control to associate the C1Magnify.

bool value

true if associates C1Magnify with the specified control. otherwise false.

Examples

The following code example shows how to use this property.

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

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);
	}
}
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