IRelationshipCollection.Create(Uri, TargetMode, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a relationship to a part with a given URI, target mode, relationship type, and (optional) identifier.
public DocumentFormat.OpenXml.Packaging.IPackageRelationship Create (Uri targetUri, System.IO.Packaging.TargetMode targetMode, string relationshipType, string? id = default);
abstract member Create : Uri * System.IO.Packaging.TargetMode * string * string -> DocumentFormat.OpenXml.Packaging.IPackageRelationship
Public Function Create (targetUri As Uri, targetMode As TargetMode, relationshipType As String, Optional id As String = Nothing) As IPackageRelationship
Parameters
- targetUri
- Uri
The URI of the target part
- targetMode
- TargetMode
Indicates if the target part is internal or external to the package.
- relationshipType
- String
A URI that uniquely defines the role of the relationship
- id
- String
A unique XML identifier
Returns
The relationship to the specified part.