IgnaceMaes / MaterialSkin

Theming .NET WinForms, C# or VB.Net, to Google's Material Design Principles.
MIT License
2.86k stars 831 forks source link

Designer shows Controls as Black in Containers #52

Closed CallumCarmicheal closed 9 years ago

CallumCarmicheal commented 9 years ago

Adding controls inside containers like TABCONTROL will make the control(s) black and show up unreadably to the user designing the interface, Although the controls show up inside the application whilst running/debugging.

Black Controls RunningControls

lukeskinner commented 9 years ago

There are two workarounds for this that I've found (you only need to use one not both):

  1. Update each TabPage in the MaterialTabControl with UseVisualStyleBackColor = false
  2. Update each TabPage in the MaterialTabControl so that the BackColor property is not set to transparent.

The demo application for MaterialSkin uses the first workaround.

It seems like this issue only happens in theSystem.Windows.Forms.TabPage control. This control inherits from System.Windows.Forms.Panel and then overrides the BackColor property. This overridden property has logic to return the transparent color if UseVisualStyleBackColor = true and a BackColor is not manually set.