diff --git a/SuperGrate/Controls/Components/SGProgressBar.cs b/SuperGrate/Controls/Components/SGProgressBar.cs index 0fd10f1..497de41 100644 --- a/SuperGrate/Controls/Components/SGProgressBar.cs +++ b/SuperGrate/Controls/Components/SGProgressBar.cs @@ -7,10 +7,15 @@ namespace SuperGrate.Controls.Components { public class SGProgressBar : ProgressBar { + private bool DesignMode = false; private System.Windows.Controls.ProgressBar ProgressBar = new System.Windows.Controls.ProgressBar(); public SGProgressBar() { - if (LicenseManager.CurrentContext.UsageMode == LicenseUsageMode.Designtime) return; + if (LicenseManager.CurrentContext.UsageMode == LicenseUsageMode.Designtime) + { + DesignMode = true; + return; + } ElementHost host = new ElementHost(); host.Dock = DockStyle.Fill; host.Parent = this; @@ -43,7 +48,7 @@ public SGProgressBar() protected override void OnSizeChanged(EventArgs e) { base.OnSizeChanged(e); - Misc.ApplyStyles(ProgressBar); + if (!DesignMode) Misc.ApplyStyles(ProgressBar); } } } \ No newline at end of file