[]
        
(Showing Draft Content)

C1.Win.TouchToolKit.C1ZoomPanel.AnimationStarting

AnimationStarting Event

Occurs before C1ZoomPanel start animation.

Namespace: C1.Win.TouchToolKit
Assembly: C1.Win.TouchToolKit.8.dll
Syntax
public event EventHandler<AnimationStartingEventArgs> AnimationStarting
Returns
Type Description
EventHandler<AnimationStartingEventArgs> Occurs before start animation.
Examples

The following code example shows how to use this event.

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

class GcZoomAnimationDemo : Form
{
	private GcZoom _gcZoom1 = new GcZoom();

	public GcZoomAnimationDemo()
	{
		_gcZoom1.Target = this;
		_gcZoom1.AnimationStarting += _gcZoom1_AnimationStarting;
	}

	void _gcZoom1_AnimationStarting(object sender, AnimationStartingEventArgs e)
	{
		if (_customizeDuringChB.Checked)
		{
			e.Duration = e.Duration * 4; // Make the animation slower.

			// e.Cancel = true;  // If it is necessary, cancel the animation by this code.
		}
		Console.WriteLine("+++ _gcZoom1_AnimationStarting +++");
		Console.WriteLine("CurrentScrollLocation:   " + e.CurrentScrollLocation.ToString());
		Console.WriteLine("CurrentZoomFactor:       " + e.CurrentZoomFactor.ToString());
		Console.WriteLine("TargetScrollLocation:    " + e.TargetScrollLocation.ToString());
		Console.WriteLine("TargetZoomFactor         " + e.TargetZoomFactor.ToString());
	}
}
Class GcZoomAnimationDemo
	Inherits Form
	Private _gcZoom1 As New GcZoom()

	Public Sub New()
		_gcZoom1.Target = Me
		AddHandler _gcZoom1.AnimationStarting, AddressOf _gcZoom1_AnimationStarting
	End Sub

	Private Sub _gcZoom1_AnimationStarting(sender As Object, e As AnimationStartingEventArgs)
		If _customizeDuringChB.Checked Then
			' Make the animation slower.
			' e.Cancel = true;  // If it is necessary, cancel the animation by this code.
			e.Duration = e.Duration * 4
		End If
		Console.WriteLine("+++ _gcZoom1_AnimationStarting +++")
		Console.WriteLine("CurrentScrollLocation:   " & e.CurrentScrollLocation.ToString())
		Console.WriteLine("CurrentZoomFactor:       " & e.CurrentZoomFactor.ToString())
		Console.WriteLine("TargetScrollLocation:    " & e.TargetScrollLocation.ToString())
		Console.WriteLine("TargetZoomFactor         " & e.TargetZoomFactor.ToString())
	End Sub
End Class