Version

CalcFrequency Property

Gets/sets the frequency with which the UltraCalcManager automatically performs calculations.
Syntax
'Declaration
 
Public Property CalcFrequency As CalcFrequency
public CalcFrequency CalcFrequency {get; set;}
Remarks

The CalcFrequency property determines when calculations are performed. They can be performed asynchronously on a timer, synchronously every time a value changes, or manually only when the ReCalc method is explicitly called in code.

By default, calculations are done Asynchronously on a timer. This ensures that the UI thread is not locked up when long or complex calculations are performed. The disadvantage to this mode is that a particular value may not be calculated when it is requested in code. When retrieving a calculated value using Asynchronous mode, you should call the Infragistics.Win.CalcEngine.IUltraCalcManager.EnsureCalculated(Infragistics.Win.CalcEngine.IUltraCalcReference,System.Boolean) method to ensure the value has been calculated.

Synchronous mode will updated all calculations immediately any time a source value of a calculation changes. Unlike Asynchronous mode, values can always be depended upon to be calculated when asked for. The disadvantage of this mode is that long or complex calculations may lock the UI thread until they are complete.

In Manual mode, no calculations are performed by the UltraCalcManager until the code explicitly calls a method to do so, such as ReCalc or Infragistics.Win.CalcEngine.IUltraCalcManager.EnsureCalculated(Infragistics.Win.CalcEngine.IUltraCalcReference,System.Boolean). This allows you complete control over when calculations take place.

Example
Demonstrates initializing the basic properties of the UltraCalcManager

Imports Infragistics.Win.UltraWinCalcManager

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.UltraCalcManager1.CalcFrequency = CalcFrequency.Asynchronous
        Me.UltraCalcManager1.AsynchronousCalcDuration = 100
        Me.UltraCalcManager1.AsynchronousCalcInterval = 20

        Dim errorIcon As Icon = New Icon("C:\Error Icon.ico")
        Me.UltraCalcManager1.ErrorIcon = errorIcon
        Me.UltraCalcManager1.ErrorIconAlignment = CalcErrorIconAlignment.MiddleLeft
    End Sub
using Infragistics.Win.UltraWinCalcManager;

		private void Form1_Load(object sender, System.EventArgs e)
		{
			this.ultraCalcManager1.CalcFrequency = CalcFrequency.Asynchronous;
			this.ultraCalcManager1.AsynchronousCalcDuration = 100;
			this.ultraCalcManager1.AsynchronousCalcInterval = 20;

			Icon errorIcon = new Icon(@"C:\Error Icon.ico");
			this.ultraCalcManager1.ErrorIcon = errorIcon;
			this.ultraCalcManager1.ErrorIconAlignment = CalcErrorIconAlignment.MiddleLeft;
		}
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