Uri syntax in SourceDictionary Source (universal Windows platform)

I transfer projects Windows 8.1to Windows 10(universal Windows platform). At this point I stopped the changes ResourceDictionaryin UWP.

For simplicity: I have a Windows 8.1 solution with two projects:

App project (FooApp)+ Styles (FooStyles) project.

FooApp has a link to FooStyles, but in App.xamlmine I have:

<Application.Resources>
<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ms-appx:///FooStyles/Brushes.xaml"/>
    </ResourceDictionary.MergedDictionaries>
Syntax

ms-appxallowed me to access resource files from other projects. Now in Windows 10 applications this no longer works. Compilation ends with the following error:

"An error occurred while finding the resource dictionary "ms-appx:///FooStyles/Brushes.xaml"."

Any tips here to fix this?

PS I would not transfer my resources from FooStyles to FooApp, because in my solution FooStyles is shared between 5 other application projects.

+4
1

UWP . , XAML Resource Dictionaries , "" "".

xaml:

<Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="ms-appx:///Default.Namespace.External.Assembly/FolderPathOffRoot/Brushes.xaml"/>
        </Application.Resources>
    </ResourceDictionary>
</ResourceDictionary.MergedDictionaries>

ms-appx, , , .

+2

Source: https://habr.com/ru/post/1610903/


All Articles