BitmapImage Constructor (Uri)
July 28, 2014
Initializes a new instance of the BitmapImage class, using the supplied URI.
Assembly: System.Windows (in System.Windows.dll)
The string provided for uriSource is interpreted as a Uniform Resource Identifier (URI). This is in contrast to an Internationalized Resource Identifier (IRI). This distinction means that you will need to encode characters that are outside of US-ASCII which are used to identify a file name.
Relative references are permitted. The starting location for the relative reference is the installation folder of the application.
The format-specific file name extensions such as .png are not necessarily required to be in the URI, but if the retrieved file is determined not to be a valid image format, a run-time exception is thrown.