如果样式库和调用库不是在同一解决方案中,首先要在样式库的属性页中勾选"Generate library layout"
引用代码:
<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ClassLibrary1/Styles/Custom.xaml" />
        <ResourceDictionary Source="ClassLibrary1/Styles/ButtonStyle.xaml"/>
        <ResourceDictionary Source="ClassLibrary1/Styles/ListsStyle.xaml"/>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>

或者

<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ms-appx:///ClassLibrary1/Styles/Custom.xaml" />
        <ResourceDictionary Source="ms-appx:///ClassLibrary1/Styles/ButtonStyle.xaml"/>
        <ResourceDictionary Source="ms-appx:///ClassLibrary1/Styles/ListsStyle.xaml"/>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>