StaticResource ContentRoot not found

Jul 27, 2013 at 12:07 PM
Hi,

I have exactely the same problem as the guy here:

https://mui.codeplex.com/discussions/441270

but unfortunately, the post didn't provide any fix, or workaround.

All I've done is to follow whats have been written in the documentation:
http://mui.codeplex.com/wikipage?title=My%20first%20Modern%20UI%20app&referringTitle=Documentation
<Application x:Class="MyApplication.ModernUI.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" />
                <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.Light.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
<mui:ModernWindow x:Class="MyApplication.ModernUI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mui="http://firstfloorsoftware.com/ModernUI"
        Title="MyApplication" 
        ContentSource="Page1.xaml">
    
    <mui:ModernWindow.MenuLinkGroups>
        <mui:LinkGroup DisplayName="Home" >
            <mui:LinkGroup.Links>
                <mui:Link DisplayName="Stocks" Source="Page1.xaml" />
            </mui:LinkGroup.Links>
        </mui:LinkGroup>
    </mui:ModernWindow.MenuLinkGroups>
    
</mui:ModernWindow>
<UserControl x:Class="MyApplication.ModernUI.Page1"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             
             mc:Ignorable="d" Height="436" Width="612">
    
    <Grid Style="{StaticResource ContentRoot}" >
        <mui:ModernTab SelectedSource="" Layout="List"  Grid.Row="1">
            <mui:ModernTab.Links>
                <mui:Link DisplayName="Lorem Ipsum1" Source="" />
                <mui:Link DisplayName="Lorem Ipsum2" Source="" />
            </mui:ModernTab.Links>
        </mui:ModernTab>

    </Grid>
</UserControl>
Because Its not able to find the ContentRoot, then when I launch my application, my usercontrol Page1.xaml is not well aligned.

I use WPF .NET 4.5, VS 2012
Microsoft Visual Studio Ultimate 2012
Version 11.0.60610.01 Update 3
Microsoft .NET Framework
Version 4.5.50709

resharper 7.1.3
Aug 2, 2013 at 11:23 PM
I'm probably hitting the same problem (or a side effect from it) after modifying a MUI-based app to run as single instance according to this method:
http://darshitdave.blogspot.no/2012/01/wpf-single-running-instance-of.html

The same System.Windows.Markup.XamlParseException / crash occurs while applying the change above to the FirstFloor.ModernUI.App sample application too.

Any ideas?