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.GetPartUri Method

Returns the URI of a PackagePart within a specified pack URI.

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

public static Uri GetPartUri (
	Uri packUri
public static Uri GetPartUri (
	Uri packUri
public static function GetPartUri (
	packUri : Uri
) : Uri
You cannot use methods in XAML.



The pack URI from which to return the PackagePart URI.

Return Value

The URI of the PackagePart in the given packUri; or a null reference (Nothing in Visual Basic), if packUri points to a package instead of a PackagePart (case 3 in the examples that follow).

The returned PackagePart URI is relative to the package root and is an absolute path that always starts with "/" and conforms to the syntax defined in the Open Packaging Conventions Specification.

The following table illustrates sample cases for GetPartUri:


 Returned Part URI 











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