Package.CreateRelationship Method
| Name | Description |
|---|---|
| Package.CreateRelationship (Uri, TargetMode, String) | Creates a package-level relationship to a specified part with a given URI, target mode, and relationship type. |
| Package.CreateRelationship (Uri, TargetMode, String, String) | Creates a package-level relationship to a specified part with a given URI, target mode, relationship type, and identifier (ID). |
A package-level relationship defines an association between the package and an associated target part or resource. A package-level relationship can be one of two forms.
-
Between a Package to a target PackagePart inside the package.
-
Between a Package to a target resource outside the package.
In a package-relationship the package is considered the "owner" of the relationship. When the package is deleted, all the relationships owned by the package are also deleted. The process of creating or deleting the relationship does not physically alter the target part or resource in any way.
For additional information see the Open Packaging Conventions (OPC) specification available for download at http://go.microsoft.com/fwlink/?LinkID=71255.