从DLL加载图像文件

时间:2013-10-02 08:45:08

标签: c# dll windows-phone-8 resources

我使用WindowsPhone 8 Project和WP8 DLL构建模块化应用程序。我尝试在WP8项目后面的代码中引用DLL中的图像。

我试过

image.Source = new BitmapImage(new Uri(@"pack://application:,,,/DllAssemblyName;component/Assets/image.png",
    UriKind.Absolute));

我在这里得到Invalid URI: Invalid port specified.

我也试过

image.Source = new BitmapImage(new Uri(@"/DllAssemblyName;component/Assets/image.png",
    UriKind.RelativeOrAbsolute));

这项工作没有例外,但图像不可见。

我错了什么?

0 个答案:

没有答案