Windows Dev Center

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.

PackUriHelper.GetPackageUri Method

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
)
public static Uri GetPackageUri (
	Uri packUri
)
public static function GetPackageUri (
	packUri : Uri
) : Uri
You cannot use methods in XAML.

Parameters

packUri

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

Return Value

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 

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

Show:
© 2015 Microsoft