Skip to main content
.NET Framework 4.6.2+

ActionBase.LockCount Property

Indicates the count of the ActionBase.BeginUpdate method calls.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

[Browsable(false)]
public int LockCount { get; }

Property Value

Type Description
Int32

A zero-based integer value representing the lock count.

Remarks

When changing multiple settings of an Action at once, it is recommended that you use the ActionBase.BeginUpdate and ActionBase.EndUpdate methods. This allows you to prevent excessive updates. For this purpose, enclose the code that changes the properties within calls to these methods.

The BeginUpdate and EndUpdate methods use an internal counter to implement their functionality. The counter’s initial value is 0. The current lock count is returned by the LockCount property. A call to the BeginUpdate method increments the counter by one. A call to the EndUpdate method decrements the counter by one, and if its new value is zero, a change notification is generated. The current locks count can be determined via the LockCount property. This property is used to postpone raising events. You may need to use this property, when you implement methods that raise custom events.

See Also