PackUriHelper::CreatePartUri Method (Uri^)


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

Creates a formatted PackagePart URI.

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

static Uri^ CreatePartUri(
	Uri^ partUri


Type: System::Uri^

The URI of the PackagePart within the package.

Return Value

Type: System::Uri^

A formatted PackagePart URI.

The URI of a PackagePart is always referenced from the Package root.

The returned PackagePart URI 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 CreatePartUri.


 Returned Part URI 









The following example shows how to use the CreatePartUri method to define relative URIs for PackagePart elements.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top