Method TrackPainting
TrackPainting(UserControl, int)
Tracks the painting of a specified user control by refreshing it a given number of times.
public static void TrackPainting(UserControl control, int repeatCount)
Parameters
controlUserControlThe UserControl to be tracked and refreshed. Cannot be null.
repeatCountintThe number of times the control should be refreshed. Must be a non-negative integer.
Remarks
This method sets the specified control as the currently tracked control, refreshes it the specified number of times, and then clears the tracking state. During each refresh, the application processes pending events to ensure UI responsiveness.