Application.GetContentStream Method
Returns a resource stream for a content data file that is located at the specified Uri (see WPF Application Resource, Content, and Data Files).
Assembly: PresentationFramework (in PresentationFramework.dll)
Parameters
- uriContent
- Type: System.Uri
The relative Uri that maps to a loose resource.
Return Value
Type: System.Windows.Resources.StreamResourceInfoA StreamResourceInfo that contains a content data file that is located at the specified Uri. If a loose resource is not found, null is returned.
| Exception | Condition |
|---|---|
| ArgumentNullException |
The Uri that is passed to GetContentStream is null. |
| ArgumentException |
The OriginalString property of the Uri that is passed to GetContentStream is null. |
| ArgumentException |
The Uri that is passed to GetContentStream is an absolute Uri. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.