Export (0) Print
Expand All

PackageRelationship.TargetMode Property

Gets a value that indicates whether the target of the relationship is Internal or External to the Package.

Namespace:  System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)

public TargetMode TargetMode { get; }

Property Value

Type: System.IO.Packaging.TargetMode
An enumeration value that indicates whether TargetUri references a resource Internal or External to the Package.

The TargetMode is specified in the call to the Package.CreateRelationship or PackagePart.CreateRelationship method that created the relationship. After the relationship is created the TargetMode cannot be changed.

When TargetMode is Internal, the TargetUri MUST be a relative reference. For a package-level relationship, the relative reference of the TargetUri is resolved relative to the pack URI of the source package that owns and contains the relationship. (Example source package pack URI: "pack://http:,,www.adatum.com,files,datapak.package/".) For a part-level relationship, the TargetUri is resolved relative to the source part that owns the relationship (TargetUri is interpreted relative to SourceUri).

When TargetMode is External, the TargetUri can be either a relative reference or a fully qualified URI. If the TargetUri is a relative reference, the reference is interpreted as relative to the location of the Package that contains this relationship.

For more information about TargetMode see Section 1.3.3 "Relationship Markup" of the Open Packaging Conventions specification available for download at http://go.microsoft.com/fwlink/?LinkID=71255.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft