Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BitmapImage.UriSource property

Applies to Windows and Windows Phone

Gets or sets the Uniform Resource Identifier (URI) of the graphics source file that generated this BitmapImage.

Syntax


public:
property Uri^ UriSource { 
   Uri^ get();
   void set (Uri^ value);
}


<BitmapImage UriSource="uri" />

Property value

Type: System.Uri [.NET] | Windows::Foundation::Uri [C++]

An object describing the URI of the graphics source file that generated this BitmapImage.

Remarks

The BaseUri property might be useful for forming the URI if you're applying an image source file to a particular Image element.

In low memory situations (most likely on lower-memory phones), it is possible for an exception to be raised with the message "The image is unrecognized" and an HRESULT of 0x88982F60. While this exception ordinarily indicates bad data, if your app is close to its memory limit then the cause of the exception is likely to be low memory. In that case, we recommend that you free memory and try again.

Windows 8 behavior

Windows 8 had URI validation logic associated with this property's setter. Starting with Windows 8.1 that validation on the property setter is removed. That doesn't mean you get no validation, it means that you get the same final validation you should be using anyway: handling for ImageOpened or ImageFailed events on the Image where the source is applied.

Apps that were compiled for Windows 8 but running on Windows 8.1 use the new Windows 8.1 behavior.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Media.Imaging
Windows::UI::Xaml::Media::Imaging [C++]

Metadata

Windows.winmd

See also

BitmapImage
Quickstart: Image and ImageBrush
XAML images sample

 

 

Show:
© 2014 Microsoft