[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1ZoomAttachingEventArgs.Cancel

Cancel Property

Cancel

Gets or sets a value indicating whether this C1ZoomAttaching event is cancel.

Declaration
public bool Cancel { get; set; }
Property Value
Type Description
bool

true if current attached operation is canceled; otherwise, false.

Remarks

In most cases, this property's default value is false. But for some form come from the GrapeCity componenet assembly, default value is true. Some form, which is for License, default value is true. If you want to attach the GcZoom to such forms, try to change the cancel property to false.

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