dennismagno / metroframework-modern-ui

My humble attempt to bring the new Modern UI alias Metro UI of Windows 8 to .NET Windows Forms applications.
http://dennismagno.github.io/metroframework-modern-ui
Other
861 stars 1.08k forks source link

MetroProgressBar has the option UseCustomBackColor but BackColor is not in the properties list. #86

Open KamikazeXeX opened 5 years ago

KamikazeXeX commented 5 years ago

It appears the property BackColor is not available/usable despite the property UseCustomBackColor being available.

When manually adding the BackColor value to the Class.designer.cs manually, the following warning is displayed: The type 'MetroFramework.Controls.MetroProgressBar' has no property 'BackColor'.

EDIT: It seems the designer is the only place this issue is caused, it appears to work just fine if you override the color programmatically.

Example work-around:

public LauncherMain()
{
    InitializeComponent();

    // We need to put this here because of issues with the designer.
    CurrentFileProgressBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(35)))), ((int)(((byte)(35)))), ((int)(((byte)(35)))));
    CurrentFileProgressBar.UseCustomBackColor = true;
}