Redraws the item and causes a paint message to be sent to the RasterImageList control that owns this item.
public void Invalidate()
public:
void Invalidate();
public:
void Invalidate()
You can call Invalidate after you make changes to a certain RasterImageListItem that belongs to a RasterImageList control. Calling Invalidate on the item causes only the portion of the control covered with the item to be invalidated as apposed to invalidating the surface of the entire control.
This example shows how to manually select an item in a RasterImageListItem while updating only the affected area.
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
///
private void SelectImageListItem(RasterImageList imageList, int itemIndex)
{
// Loop through all the items in the list
for (int i = 0; i < imageList.Items.Count; i++)
{
RasterImageListItem item = imageList.Items[i];
// If this is not out item and is selected, de-select it
if (i != itemIndex && item.Selected)
{
item.Selected = false;
// re-paint only this item
item.Invalidate();
}
// If this is our item and is not selected already, select it
if (i == itemIndex && !item.Selected)
{
item.Selected = true;
// re-paint only this item
item.Invalidate();
}
}
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document