Skip to content

Commit 7e0a468

Browse files
committed
Enable double buffering for custom ListView control.
Added XML documentation and ensured double buffering is enabled to reduce visual flickering during frequent updates. Improves rendering performance for scenarios with constant updates.
1 parent 67aa746 commit 7e0a468

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
namespace Nikse.SubtitleEdit.PluginLogic.Controls;
22

3+
/// <summary>
4+
/// A custom implementation of the ListView control with double buffering enabled.
5+
/// </summary>
6+
/// <remarks>
7+
/// This class inherits from ListView and overrides its double-buffering behavior to reduce flickering during frequent updates or additions of items to the control.
8+
/// </remarks>
39
public class DoubleBufferedListView : ListView
410
{
511
public DoubleBufferedListView()
612
{
13+
// to fix flickering when nearly constant refresh listview when adding items
714
DoubleBuffered = true;
815
}
916
}

0 commit comments

Comments
 (0)