Version

CalculationFrequency Property

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

The CalculationFrequency 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 PerformCalculations 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 ICalculationManager.EnsureCalculated 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 XamCalculationManager until the code explicitly calls a method to do so, such as PerformCalculations or ICalculationManager.EnsureCalculated. This allows you complete control over when calculations take place.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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