Cannot locate resource 'assets/modernui.xaml'

May 2, 2013 at 1:53 AM
Edited May 2, 2013 at 1:56 AM
I wanted to use "EmptyWindow" style, so i download the latest code (100090) and built the code.

But now my resources are not being found when i add the new DLLs to the project.
In App.xaml:
<ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" />
<ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.Dark.xaml"/>
<ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernWindowEx.xaml"/> 
Do you know what I did wrong building the source? It works fine if i use the zip file of the latest stable build 1.0.3.

I also noticed in WPF4 project that ModernWindowEx.xaml was not a file in the assets folder.

Using .NET4.0 with VS2010
May 2, 2013 at 1:10 PM
The ModernWindowEx.xaml dictionary, containing the EmptyWindow style is not available in the latest release yet, you'll need to get the latest source code and compile it yourself. The WPF4 project contains file links to the resource dictionaries, the actual files are in the Assets folders of the mui project for WPF4.5.

The file link ModernWindowEx.xaml was missing from the WPF4 project, I just added it.
May 2, 2013 at 5:10 PM
I am still getting the issue with the new code (100280). I open the project in VS2010, i have only .NET4.0. I compile as release. Use the new references in my project and the i get the error "An error occurred while finding the resource dictionary "/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" and ModernUI.Dark.xaml. If i change the project references back to the stable build, the files resource dictionaries work fine.

So it has to be how i am building the new DLLs but i can not figure out what i am doing wrong.

I just change the build to release and select the project FirstFloor.ModernUI.WPF4, right click and select Rebuild. I then use the DLLs created in the bin/Release folder in my project. If i use the new DLLs i created, the files are not found. If i go back and use the DLLs from the zip file of the last stable release, everything works fine.

Any other idea what i can try? I think i am about to buy VS2012. I have found to many projects that are using it now.
May 3, 2013 at 12:30 AM
Can you share your dll so I can take a look?
May 3, 2013 at 12:43 AM
Here is the DLL built with DEBUG from the source code as of 100090.
May 3, 2013 at 4:29 AM
I have the same issue in VS2010
The .dll had been got from NuGet
May 3, 2013 at 2:36 PM
I can see it doesn't work, not sure why. I've recompiled the WPF4 version (in VS2012) including the EmptyWindow style.
May 3, 2013 at 5:03 PM
This new DLL does works. Thanks.
May 24, 2013 at 10:32 AM
Hi ricorx7, kozw!
What I made wrong? I downloaded source code, built it, added reference to FirstFloor.ModernUI.dll from WPF 4.0 and WPF 4.5 and tried to add EmptyWindow style
The result is "System.Windows.Markup.XamlParseException occurred Message="System.Windows.FrameworkElement.Style" property setting throwed an exception".
Using I got the same results. I used VS 2012, .NET 4.5
May 24, 2013 at 4:07 PM
Incorrect syntax, use Style="{StaticResource EmptyWindow}"
May 24, 2013 at 7:44 PM
Thank you, kozw! It works.
Jul 2, 2013 at 12:47 AM
it works for me but i get at design time

Error 1 'ModernWindow' TargetType does not match type of element 'WindowInstance'.