From 7beb54ba993c1c5d6f70d8780b9cf386f18efef8 Mon Sep 17 00:00:00 2001 From: Dylan Bickerstaff Date: Thu, 31 Aug 2023 12:18:59 -0400 Subject: [PATCH] . --- SuperGrate/Controls/Components/SGProgressBar.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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