Change panel theme (color) to match Windows themes

I want to change the color of the panel to match the currently selected Windows theme. I have installed prop EnableVisStyles. It changes things like the Windows toolbar and title bar. However, the color of the panel remains the same. Is there a way to achieve this?

Best regards, Severe Suman

+1


source to share


3 answers


You may have set the color of the shape or panel. Go to the constructor and check the BackColor property on your form and panel. They must be set to "Control" (under the "System" tab) and not a specific color.



+2


source


I think Rob is right. You can also right-click the property and select Reset.



0


source


Two different color sets are available. In leuu best terms, let them call them literal and system colors.

The color letters are fixed and always remain the same. If you set a series to gray, it will always be gray.

Color colors

Systems are dynamic - they are named for purposes and modified with the system theme. For example, the Control system color is the color for the control background. This is usually gray, but it can vary.

In Windows.Forms Literal colors are available as static properties in System.Drawing.Color, while system colors are available as static properties in System.Drawing.Systemolors.

I think things are a little different with WPF, but this is not an area I'm still familiar with.

0


source







All Articles