C# Tabstrip control doesn't paint correctly on resize or maximize




When you are using a docked or anchored Tabstrip control in visual studio you may find that it doesn't paint correctly on resize or maximize

Normally...



Maximized...





After having added code to refresh the tabstrip on resize I found this doesn't solve the problem.

The key is to perform the refresh in the SizeChanged event of the control. This will redraw the control correctly.


  private void TabControl_SizeChanged(object sender, EventArgs e)
  {
         TabControl.Refresh();
  }

Comments

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Windows Server 2019 desktop icons such as My Computer, Windows cannot access the specified device, path, or file.