[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1ZoomAttachingEventArgs.Form

Form Property

Form

Gets the Form that is preparing be attached by C1Zoom component.

Declaration
public Form Form { get; }
Property Value
Type Description
Form

The Form that is preparing be attached by C1Zoom component.

Examples

The following code example shows how to use this property.

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

public class GcApplicationZoomDemo : Form
{
	private GcApplicationZoom _gcApplicationZoom;

	public GcApplicationZoomDemo()
	{
		InitializeComponent();

		_gcApplicationZoom.GcZoomAttaching += _gcApplicationZoom_GcZoomAttaching;
	}

	void _gcApplicationZoom_GcZoomAttaching(object sender, GcZoomAttachingEventArgs e)
	{
		// May be some forms should not be zoom.
		if (e.Form is NormalForm)
		{
			e.Cancel = true;
		}
		else
		{
			e.GcZoom.AutoShowControl = true;
		}
	}

	private void InitializeComponent()
	{
		_gcApplicationZoom = new GcApplicationZoom();
	}
}
Public Class GcApplicationZoomDemo
	Inherits Form
	Private _showFormButton As Button
	Private _showForm2Button As Button
	Private _gcApplicationZoom As GcApplicationZoom

	Public Sub New()
		InitializeComponent()

		AddHandler _gcApplicationZoom.GcZoomAttaching, AddressOf _gcApplicationZoom_GcZoomAttaching
	End Sub

	Private Sub _gcApplicationZoom_GcZoomAttaching(sender As Object, e As GcZoomAttachingEventArgs)
		' May be some forms should not be zoom.
		If TypeOf e.Form Is NormalForm Then
			e.Cancel = True
		Else
			e.GcZoom.AutoShowControl = True
		End If
	End Sub

	Private Sub InitializeComponent()
		_gcApplicationZoom = New GcApplicationZoom()
	End Sub
End Class