PackageRelationship Class
Assembly: WindowsBase (in windowsbase.dll)
A PackageRelationship defines an association between a sourcePackage or PackagePart to a targetPackagePart or external resource. The source object is considered the "owner" of the relationship.
The PackageRelationship class has no public constructor; instead, two Create methods are used:
| Package.CreateRelationship | Creates a "package-level" relationship—from a package to a specified part or external resource. |
| PackagePart.CreateRelationship | Creates a "part-level" relationship—from one part to another part or external resource. |
The source package or part is identified by the SourceUri property of the relationship. The target part or external resource is identified by the TargetUri property of the relationship.
Creating or deleting a relationship does not affect the source or target objects in any way.
If a source object is deleted, all relationships owned by the object are also deleted.
Relationships enable navigation both in a document and between documents. Relationships also support document object model services, such as linking a PrintTicket to specific document elements when printing.
For more information about PackageRelationship elements see Section 1.3 "Relationships" in the Open Packaging Conventions specification available for download at http://go.microsoft.com/fwlink/?LinkID=71255.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.