BitmapImage.UriSource 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置生成此 BitmapImage 的图形源文件的统一资源标识符(URI)。
public:
property Uri ^ UriSource { Uri ^ get(); void set(Uri ^ value); };
Uri UriSource();
void UriSource(Uri value);
public System.Uri UriSource { get; set; }
var uri = bitmapImage.uriSource;
bitmapImage.uriSource = uri;
Public Property UriSource As Uri
<BitmapImage UriSource="uri" />
属性值
描述生成此 BitmapImage 的图形源文件的统一资源标识符(URI)的对象。
注解
如果将图像源文件应用于特定 Image 元素,则 BaseUri 属性对于形成 URI 可能很有用。
在内存不足的情况下,可能会引发异常,消息“无法识别映像”和0x88982F60的 HRESULT。 虽然此异常通常表示不良数据,但如果应用接近其内存限制,则异常的原因可能是内存不足。 在这种情况下,我们建议释放内存,然后重试。