Method RemoveOverlays
RemoveOverlays(ControlOverlayFlags, bool)
Removes overlays from the control that match the specified flags.
public virtual bool RemoveOverlays(ControlOverlayFlags flags, bool invalidate = true)
Parameters
flagsControlOverlayFlagsThe flags that determine which overlays to remove.
invalidateboolA value indicating whether the control should be invalidated after removing the overlays. The default is true.
Returns
Remarks
This method iterates through the collection of overlays and removes
those that match the specified flags. If invalidate is
true, the control is invalidated
to reflect the changes.