【发布时间】:2013-04-12 03:15:51
【问题描述】:
我在 C# 代码中看到了一行:
Image = new BitmapImage(
new Uri("/MyProgramName;component/Images/a.png", UriKind.Relative));
那个“;”是什么意思在这个 Uri 字符串中做什么?
那个 a.png 实际上在 MyProgramName/Images/a.png 下。
【问题讨论】:
我在 C# 代码中看到了一行:
Image = new BitmapImage(
new Uri("/MyProgramName;component/Images/a.png", UriKind.Relative));
那个“;”是什么意思在这个 Uri 字符串中做什么?
那个 a.png 实际上在 MyProgramName/Images/a.png 下。
【问题讨论】:
它只是WPF Resource URIs 的变体之一的分隔符。分号对所有 URI 没有任何特定的通用含义。
【讨论】: