IXpsFixedPageWriter.AddResource(Type, Uri) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
新增一個新 XpsResource 頁面。
public:
System::Windows::Xps::Packaging::XpsResource ^ AddResource(Type ^ resourceType, Uri ^ resourceUri);
public System.Windows.Xps.Packaging.XpsResource AddResource(Type resourceType, Uri resourceUri);
abstract member AddResource : Type * Uri -> System.Windows.Xps.Packaging.XpsResource
Public Function AddResource (resourceType As Type, resourceUri As Uri) As XpsResource
參數
- resourceType
- Type
該加入什麼資源。
- resourceUri
- Uri
資源加入的絕對路徑,或 null。
傳回
新增的 XML 論文規範(XPS)資源。
例外狀況
resourceType 是 null。
resourceType 是空字串。
備註
AddResource 新增一個 XpsResource 新文件到文件套件,並將其與目前的 FixedPage.
若 resourceUri 為 , null則會自動產生唯一資源 Uri 。