PackagePart.Uri 属性

定义

获取部件的 URI。Gets the URI of the part.

public:
 property Uri ^ Uri { Uri ^ get(); };
public Uri Uri { get; }
member this.Uri : Uri
Public ReadOnly Property Uri As Uri

属性值

Uri

相对于包根的部件的 URI。The URI of the part relative to the package root.

例外

已删除此部分。The part has been deleted.

- 或 --or- Package 没有打开(调用了 Dispose(Boolean)Close())。The Package is not open (Dispose(Boolean) or Close() has been called).

注解

Uri 是只读属性,只能在父对象处于打开状态时对其进行访问 PackageUri is a read-only property that can be accessed only when the parent Package is open.

Uri 属性是由构造函数自动设置的 PackagePartThe Uri property is automatically set by the PackagePart constructor. 在由构造函数设置后, Uri 无法更改部分的。After it is set by the constructor, the Uri of the part cannot be changed.

适用于

另请参阅