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

SOLVED: Exchange Online Management PowerShell Connect-ExchangeOnline bug "A window handle must be configured. See https://aka.ms/msal-net-wam#parent-window-handles"

System error 86 has occurred. The specified network password is not correct.

The security identifier of the "NT SERVICE\WdiServiceHost" account is "S-1-5-80-3139157870-2983391045-3678747466-658725712-1809340420"