Export (0) Print
Expand All

PackagePart.CreateRelationship Method

Creates a part-level relationship between this PackagePart to a specified target PackagePart or external resource.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method CreateRelationship(Uri, TargetMode, String) Creates a part-level relationship between this PackagePart to a specified target PackagePart or external resource.
Public method CreateRelationship(Uri, TargetMode, String, String) Creates a part-level relationship between this PackagePart to a specified target PackagePart or external resource.
Top

A part-level relationship defines an association between this part and a target part or resource. A part-level relationship can be one of two forms.

In a part-relationship the source part is considered the "owner" of the relationship. When the source part is deleted, all the relationships owned by the part are also deleted. The process of creating or deleting the relationship does not physically alter the target part or resource in any way.

The CreateRelationship method does not physically change either the source part, or the target part or resource in any way.

The target of a relationship cannot be another relationship.

For more information about package relationships see section 1.3 of the Open Packaging Conventions (OPC) specification available for download at http://go.microsoft.com/fwlink/?LinkID=71255.

For more information about XPS documents see the Open XML Paper Specification (XPS) available for download at http://go.microsoft.com/fwlink/?LinkID=67000.

Show:
© 2014 Microsoft