ghost1372 / HandyControls

Contains some simple and commonly used WPF controls based on HandyControl
https://ghost1372.github.io/
MIT License
1.1k stars 104 forks source link

The type initializer for 'HandyControl.Controls.Window' threw an exception. #164

Closed thomaspb88 closed 1 year ago

thomaspb88 commented 2 years ago

I'm trying to instantiate a BlurWindow and getting an exception thrown in the ctor

Stack trace:

at HandyControl.Tools.ApplicationHelper.GetAbsoluteUri(String Path) in C:\Users\mahdi\Documents\GitHub\HandyControls\src\Shared\HandyControl_Shared\HandyControls\Tools\Helper\ApplicationHelper.cs:line 85 at HandyControl.Tools.ResourceHelper.GetStandaloneTheme() in C:\Users\mahdi\Documents\GitHub\HandyControls\src\Shared\HandyControl_Shared\Tools\Helper\ResourceHelper.cs:line 44 at HandyControl.Tools.ResourceHelper.GetTheme() in C:\Users\mahdi\Documents\GitHub\HandyControls\src\Shared\HandyControl_Shared\Tools\Helper\ResourceHelper.cs:line 40 at HandyControl.Tools.ResourceHelper.GetResourceInternal[T](String key) in C:\Users\mahdi\Documents\GitHub\HandyControls\src\Shared\HandyControl_Shared\Tools\Helper\ResourceHelper.cs:line 34 at HandyControl.Controls.Window..cctor() in C:\Users\mahdi\Documents\GitHub\HandyControls\src\Shared\HandyControl_Shared\Controls\Window\Window.cs:line 53

I'm currently working in a VSTO project, so no App.xaml to place

Could this be the cause? ### Steps to reproduce the bug var window = new HandyControl.Controls.BlurWindow(); window.Show(); ### Expected behavior _No response_ ### Screenshots _No response_ ### NuGet package version HandyControl 3.4.0 ### IDE Visual Studio 2019 ### Framework type .Net Framework 4.5.2 ### Windows version _No response_ ### Additional context _No response_