[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1Zoom.GetDisplayRectangle

GetDisplayRectangle Method

GetDisplayRectangle(Control)

Get control visibility rectangle.

Declaration
public Rectangle GetDisplayRectangle(Control control)
Public Function GetDisplayRectangle(control As Control) As Rectangle
Parameters
Type Name Description
Control control

The target control

Returns
Type Description
Rectangle

A Rectangle value that represents the control visibility area.

Examples

The following code example shows how to use this method.

This code example is part of a larger example provided for the Controls property.

public class GcZoomControlsDemo : Form
 {
 	private GcZoom _gcZoom1 = new GcZoom();
 	private Button _getDisplayRectangleButton;

 	public GcZoomControlsDemo()
 	{
 		InitializeComponent();

 		_gcZoom1.Target = this;

 		_getDisplayRectangleButton.Click += _getDisplayRectangleButton_Click;
 	}

 	void _getDisplayRectangleButton_Click(object sender, EventArgs e)
 	{
 		Console.WriteLine(_gcZoom1.GetDisplayRectangle(_getDisplayRectangleButton).ToString());
 	}

 	private void InitializeComponent()
 	{
 		_getDisplayRectangleButton = new Button();
 		_getDisplayRectangleButton.Text = "GetDisplayRectangle";
 		_getDisplayRectangleButton.Location = new Point(20, 250);
 		_getDisplayRectangleButton.Size = new Size(120, 25);
 		this.Controls.Add(_getDisplayRectangleButton);
 	}
 }
Public Class GcZoomControlsDemo
	Inherits Form
	Private _gcZoom1 As New GcZoom()
	Private _getDisplayRectangleButton As Button

	Public Sub New()
		InitializeComponent()

		_gcZoom1.Target = Me

		AddHandler _getDisplayRectangleButton.Click, AddressOf _getDisplayRectangleButton_Click
	End Sub

	Private Sub _getDisplayRectangleButton_Click(sender As Object, e As EventArgs)
		Console.WriteLine(_gcZoom1.GetDisplayRectangle(_getDisplayRectangleButton).ToString())
	End Sub

	Private Sub InitializeComponent()
		_getDisplayRectangleButton = New Button()
		_getDisplayRectangleButton.Text = "GetDisplayRectangle"
		_getDisplayRectangleButton.Location = New Point(20, 250)
		_getDisplayRectangleButton.Size = New Size(120, 25)
		Me.Controls.Add(_getDisplayRectangleButton)
	End Sub
End Class