Leadtools.WinForms Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
BeginUpdate Method
See Also 
Leadtools.WinForms Namespace > RasterImageList Class : BeginUpdate Method




Prevents the control from drawing until the EndUpdate method is called.

Syntax

Visual Basic (Declaration) 
Public Sub BeginUpdate() 
Visual Basic (Usage)Copy Code
Dim instance As RasterImageList
 
instance.BeginUpdate()
C# 
public void BeginUpdate()
Managed Extensions for C++ 
public: void BeginUpdate(); 
C++/CLI 
public:
void BeginUpdate(); 

Example

For an example, refer to Image.

Remarks

The preferred way to add multiple items to a RasterImageList is to use the AddRange method of the RasterImageListItemCollection (accessed through the Items property of the RasterImageList). This enables you to add an array of items to the list in a single operation. However, if you want to add items one at a time using the Add method of the RasterImageListItemCollection class, you can use the BeginUpdate method to prevent the control from repainting the RasterImageList each time an item is added. Once you have completed the task of adding items to the control, call the EndUpdate method to enable the RasterImageList to repaint. This way of adding items can prevent flickered drawing of the RasterImageList when a large number of items are being added to the control.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also