Version

BeforeCalculateImmediate Event (UltraCalculator)

Fires on before pending Calculation, allowing user to cancel default calculation and or change the values
Syntax
'Declaration
 
Public Event BeforeCalculateImmediate As BeforeCalculateImmediateEventHandler
public event BeforeCalculateImmediateEventHandler BeforeCalculateImmediate
Event Data

The event handler receives an argument of type OnCalculateImmediateEventArgs containing data related to this event. The following OnCalculateImmediateEventArgs properties provide information specific to this event.

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs) 
CurrentValue Gets/Sets CurrentValue
CurrentValueDecimal Get/Sets the current value as decimal.
Operation Operation string, this value may be changed by the user and handled by the user.
Example
This event occurs before an immediate calculation has taken place. User clicks the sqr button, or any button with type 'Immediate'. The event itself is cancellable.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Private Sub UltraCalculatorDropDown1_BeforeCalculateImmediate(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinEditors.UltraWinCalc.OnCalculateImmediateEventArgs) Handles UltraCalculatorDropDown1.BeforeCalculateImmediate
    
    ' This event occurs before an immediate calculation has taken place.
    ' User clicks the sqr button, or any button with type 'Immediate' The 
    ' event itself is cancellable.
    Debug.WriteLine("BeforeCalculateImmediate: Cancel = " + e.Cancel.ToString())
    Debug.WriteLine(String.Format("Params: Operation {0}, Current Value {1}", e.Operation, e.CurrentValue))

End Sub
using System.Diagnostics;

	private void ultraCalculatorDropDown1_BeforeCalculateImmediate(object sender, Infragistics.Win.UltraWinEditors.UltraWinCalc.OnCalculateImmediateEventArgs e)
	{
		
		// This event occurs before an immediate calculation has taken place.
		// User clicks the sqr button, or any button with type 'Immediate' The 
		// event itself is cancellable.
		Debug.WriteLine("BeforeCalculateImmediate: Cancel = " + e.Cancel.ToString());
		Debug.WriteLine(string.Format("Params: Operation {0}, Current Value {1}",e.Operation, e.CurrentValue));

	}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also