[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.MagnifierEventArgs

MagnifierEventArgs Class

Provides data for the Closed and Move event.

Inheritance
MagnifierEventArgs
Namespace: C1.Win.TouchToolKit
Assembly: C1.Win.TouchToolKit.10.dll
Syntax
public class MagnifierEventArgs : EventArgs
Public Class MagnifierEventArgs
    Inherits EventArgs
Remarks

The MagnifierEventArgs contains information regarding position and target control before the magnifier popup.

Examples

The following code example shows how to use MagnifierEventArgs class.

public class GcMagnifierEventDemo : Form
{
	private TextBox _magnifierTextBox;
	private GcMagnifier _gcMagnifierObj = new GcMagnifier();

	public GcMagnifierEventDemo()
	{
		InitializeComponent();

		_gcMagnifierObj.SetEnableMagnifier(_magnifierTextBox, true);
		_gcMagnifierObj.Move += _gcMagnifierObj_Move;
		_gcMagnifierObj.Closed += _gcMagnifierObj_Closed;
		_gcMagnifierObj.MagnifierShowing += _gcMagnifierObj_MagnifierShowing;
	}

	void _gcMagnifierObj_Move(object sender, MagnifierEventArgs e)
	{
		Console.WriteLine(e.TargetControl.ToString());
		Console.WriteLine(e.Position.ToString());
	}

	void _gcMagnifierObj_Closed(object sender, MagnifierEventArgs e)
	{
		Console.WriteLine(e.TargetControl.ToString());
		Console.WriteLine(e.Position.ToString());
	}

	void _gcMagnifierObj_MagnifierShowing(object sender, MagnifierEventArgs e)
	{
		Console.WriteLine(e.TargetControl.ToString());
		Console.WriteLine(e.Position.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 GcMagnifierEventDemo
	Inherits Form
	Private _magnifierTextBox As TextBox
	Private _gcMagnifierObj As New GcMagnifier()

	Public Sub New()
		InitializeComponent()

		_gcMagnifierObj.SetEnableMagnifier(_magnifierTextBox, True)
		AddHandler _gcMagnifierObj.Move, AddressOf _gcMagnifierObj_Move
		AddHandler _gcMagnifierObj.Closed, AddressOf _gcMagnifierObj_Closed
		AddHandler _gcMagnifierObj.MagnifierShowing, AddressOf _gcMagnifierObj_MagnifierShowing
	End Sub

	Private Sub _gcMagnifierObj_Move(sender As Object, e As MagnifierEventArgs)
		Console.WriteLine(e.TargetControl.ToString())
		Console.WriteLine(e.Position.ToString())
	End Sub

	Private Sub _gcMagnifierObj_Closed(sender As Object, e As MagnifierEventArgs)
		Console.WriteLine(e.TargetControl.ToString())
		Console.WriteLine(e.Position.ToString())
	End Sub

	Private Sub _gcMagnifierObj_MagnifierShowing(sender As Object, e As MagnifierEventArgs)
		Console.WriteLine(e.TargetControl.ToString())
		Console.WriteLine(e.Position.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

Properties

Name Description
Position

Gets a value indicating the position.

TargetControl

Gets the target object which magnifier shows on it.