Using a global ResourceDictionary in a UserControl Library

佐手、 提交于 2019-12-06 14:52:25
Kent Boogaart

Check out the pack URI syntax. Something like:

<ResourceDictionary Source="ProjectB;component/MyResourceDictionary"/>

@Kent Boogaart

Thanks for the help Kent, here is the working code

<UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/ProjectA;component/MyResourceDictionary.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</UserControl.Resources>

anyone else having trouble with this check out this link - http://msdn.microsoft.com/en-us/library/aa970069.aspx

Thanks, Eamonn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!