C# .Net 4.5
I have a ListView that is constantly being updated by different threads through this method:
public void UpdateUI_List_SetRow(int rowNum, ListViewItem item)
{
lock (lock_List)
{
try
{
if (this.lstStatus.InvokeRequired)
lstStatus.Invoke(new MethodInvoker(() => lstStatus.Items[rowNum] = item));
else
lstStatus.Items[rowNum] = item;
}
catch (Exception ex)
{
ErrorLogging.Log(ex);
}
}
}
It constantly flickers while being updated. I have tried the DoubleBuffered fix (How to prevent flickering in ListView when updating a single ListViewItem's text?) but it didn't work.
Sorry if this is a duplicate post but I couldn't find any solution other than enabling double buffering.