.NET Framework Class Library
PackUriHelper..::.GetRelationshipPartUri Method

Returns the URI of the relationship part associated with a specified PackagePart.

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

Visual Basic (Declaration)
Public Shared Function GetRelationshipPartUri ( _
    partUri As Uri _
) As Uri
Visual Basic (Usage)
Dim partUri As Uri
Dim returnValue As Uri

returnValue = PackUriHelper.GetRelationshipPartUri(partUri)
C#
public static Uri GetRelationshipPartUri(
    Uri partUri
)
Visual C++
public:
static Uri^ GetRelationshipPartUri(
    Uri^ partUri
)
JScript
public static function GetRelationshipPartUri(
    partUri : Uri
) : Uri
XAML
You cannot use methods in XAML.

Parameters

partUri
Type: System..::.Uri
The Uri of the PackagePart to return the URI for the associated PackageRelationship.

Return Value

Type: System..::.Uri
The URI of the PackageRelationship part associated with the PackagePart identified by partUri.
Exceptions

ExceptionCondition
ArgumentNullException

partUri is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

partUri syntax is not valid for a package part URI.

-or-

partUri is an absolute URI.

-or-

partUri references a relationship part.

Remarks

partUri must identify either the Package ("/") or a PackagePart that is not a PackageRelationship part.

For more information about PackageRelationship parts, see Section 9.3 "Relationships" in the Open Packaging Conventions Specification available for download at Specifications and License Downloads.

Examples

Pack URIs in Windows Presentation Foundation

Open Packaging Conventions Specification

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Tags :


Page view tracker