【问题标题】:WPF GifBitmapDecoder Uri Relative Path IssueWPF GifBitmapDecoder Uri 相对路径问题
【发布时间】:2011-04-19 17:02:52
【问题描述】:

我正在尝试将 Uri 对象的 uriString 设置为用于 GifBitmapDecoder 的相对路径。

在运行时我收到以下错误:

Invalid URI: The format of the URI could not be determined.

我的相对路径如下格式:

/TestApplication;component/Images/Busy.gif

如果我使用图像的绝对路径,一切都会完美!

任何帮助将不胜感激!

【问题讨论】:

    标签: wpf image path uri animated-gif


    【解决方案1】:

    在以下位置找到答案:

    http://msdn.microsoft.com/en-us/library/aa970069.aspx

    我缺少以下内容:pack://application:,,, 在我的相对路径前面。

    【讨论】:

    • 链接没有损坏,它只是默认为最新版本的 .NET。请改用 .NET 3.5。
    猜你喜欢
    • 2011-08-25
    • 2014-05-09
    • 2016-01-08
    • 2011-04-29
    • 1970-01-01
    • 2012-04-27
    • 2015-08-14
    • 2016-07-10
    • 2019-03-16
    相关资源
    最近更新 更多