Skip to main content

ResourcesCheckedListBoxControl.BeginUpdate() Method

Locks the ResourcesCheckedListBoxControl, preventing visual updates of the object and its elements until the EndUpdate or CancelUpdate method is called.

Namespace: DevExpress.Xpf.Scheduler.UI

Assembly: DevExpress.Xpf.Scheduler.v24.2.dll

NuGet Package: DevExpress.Wpf.Scheduler

Declaration

public void BeginUpdate()

Remarks

Important

You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

Once the BeginUpdate method has been called, modifying the ResourcesCheckedListBoxControl and its elements does not result in immediate visual updates. So, multiple modifications can be made to the ResourcesCheckedListBoxControl object and its elements without a major impact on performance or screen flickering. After all the desired operations have been finished, call the EndUpdate or CancelUpdate method. Use the EndUpdate method to immediately perform a visual update, reflecting all the changes made. If no immediate visual update is required (for example, if no visual setting has been affected by the operations performed), call the CancelUpdate method.

The BeginUpdate, EndUpdate and CancelUpdate methods use an internal counter to implement the update functionality. The counter’s initial value is 0. The BeginUpdate method increments the counter. The EndUpdate and CancelUpdate decrement the counter.

The object’s visual updates (change notifications) are forbidden if the counter’s value is greater than 0, and the updates are enabled if the counter’s value is 0.

Each call to BeginUpdate must be paired with a call to EndUpdate or CancelUpdate. To ensure that EndUpdate/CancelUpdate is always called even if an exception occurs, use the try…finally statement.

See Also