PackUriHelper.GetPackageUri Method (Uri)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns the inner URI that points to the entire package of a specified pack URI.

Namespace:   System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)

public static Uri GetPackageUri(
	Uri packUri
)

Parameters

packUri
Type: System.Uri

The pack URI from which to return the URI of the Package.

Return Value

Type: System.Uri

The URI of the Package from the specified packUri.

The following table illustrates sample cases for GetPackageUri.

 packUri

 Returned Package URI 

 pack://http:,,www.proseware.com,mypackage.xyz/a/mydoc.xaml 

 http://www.proseware.com/mypackage.xyz 

 pack://http:,,www.proseware.com,packages.aspx%3fmypackage/a/bar.xaml 

 http://www.proseware.com/packages.aspx?mypackage 

 pack://http:,,www.proseware.com,mypackage.pkg 

 http://www.proseware.com/mypackage.pkg 

 pack://ftp:,,ftp.proseware.com,packages,mypackage1.abc/a/picture.jpg 

 ftp://ftp.proseware.com/packages/mypackage1.abc 

 pack://file:,,,d:,packages,mypackage2.pkg/a/bar.xaml 

 file:///d:/packages/mypackage2.pkg 

.NET Framework
Available since 3.0
Return to top
Show: