【问题标题】:External Merged Dictionaries Broken in Silverlight 3 RTM?Silverlight 3 RTM 中的外部合并字典损坏?
【发布时间】:2009-07-13 11:37:15
【问题描述】:

我只想在引用的程序集中引用资源字典。

程序集名称:ResourceTest.Content

资源字典路径:./Dictionary2.xaml

这适用于 SL3 Beta 1:

<ResourceDictionary Source="ResourceTest.Content;component/Dictionary2.xaml" />

我在 Blend 3+Sketchflow 中尝试过这个并且它有效(在设计时):

<ResourceDictionary Source="pack://application:,,,/ResourceTest.Content;component/Dictionary2.xaml" />

但是,无论哪种方式,当我从 Visual Studio 运行时,都会出现以下错误:

属性 ResourceTest.Content;component/Dictionary2.xaml 值超出范围。 [行:10 位置:44]

属性 pack://application:,,,/ResourceTest.Content;component/Dictionary2.xaml 值超出范围。 [行:11 位置:44]

【问题讨论】:

    标签: silverlight-3.0 mergeddictionaries


    【解决方案1】:

    尝试在您的程序集名称前添加 /:

    这应该可以工作...

    【讨论】:

    • 你是对的。我还发现这可以通过在 Blend 3 中打开并链接到其他项目中的资源字典来解决。 ^_^
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-20
    • 1970-01-01
    相关资源
    最近更新 更多