Version

CreateRelationship Method (IPackage)

Creates a package-level relationship to a part with a given URI, target mode, relationship type, and identifier (ID).
Syntax

Parameters

targetUri
The uniform resource identifier (URI) of the target part.
targetMode
Indicates if the target part is System.IO.Packaging.TargetMode.Internal or System.IO.Packaging.TargetMode.External to the package.
relationshipType
A URI that uniquely defines the role of the relationship.
id
A unique XML identifier.

Return Value

The package-level relationship to the specified part.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also