Skip to content

Commit

Permalink
fixed #387
Browse files Browse the repository at this point in the history
  • Loading branch information
NaBian committed May 26, 2020
1 parent 1afe3ab commit 58b3db0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class BlurWindow : Window
{
static BlurWindow()
{
StyleProperty.OverrideMetadata(typeof(BlurWindow), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowBlur)));
StyleProperty.OverrideMetadata(typeof(BlurWindow), new FrameworkPropertyMetadata(ResourceHelper.GetResource<Style>(ResourceToken.WindowBlur)));
}

public override void OnApplyTemplate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public Color InactiveGlowColor

static GlowWindow()
{
StyleProperty.OverrideMetadata(typeof(GlowWindow), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowGlow)));
StyleProperty.OverrideMetadata(typeof(GlowWindow), new FrameworkPropertyMetadata(ResourceHelper.GetResource<Style>(ResourceToken.WindowGlow)));
ResizeModeProperty.OverrideMetadata(typeof(GlowWindow), new FrameworkPropertyMetadata(OnResizeModeChanged));
}

Expand Down
2 changes: 1 addition & 1 deletion src/Shared/HandyControl_Shared/Controls/Window/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public class Window : System.Windows.Window

static Window()
{
StyleProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowWin10)));
StyleProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(ResourceHelper.GetResource<Style>(ResourceToken.WindowWin10)));
}

public Window()
Expand Down

0 comments on commit 58b3db0

Please sign in to comment.