DeferredUIAction

Ecng.Xaml

Executes an action on the UI thread no more frequently than a specified interval, with optional extra delay.

Constructors

DeferredUIAction
public DeferredUIAction(Action action, TimeSpan minInterval, TimeSpan? delayBy)
deferredUIAction = DeferredUIAction(action, minInterval, delayBy)

Initializes a new instance of the DeferredUIAction class.

action
The action to execute.
minInterval
The minimum time between consecutive executions.
delayBy
Optional additional delay applied from the last request; must be less than or equal to .

Properties

IsEnabled
public bool IsEnabled { get; set; }
value = deferredUIAction.IsEnabled
deferredUIAction.IsEnabled = value

Gets or sets a value indicating whether execution is enabled.

Methods

Execute
public void Execute()
deferredUIAction.Execute()

Requests execution of the action honoring throttling constraints; the action will run on the UI thread.