CustomPropertiesPart
Overview
CustomPropertiesPart is a class in Aspose.Slides FOSS for .NET.
Parses and serializes docProps/custom.xml. Each custom property is stored with a typed value (string, int, double, bool, or DateTime). PIDs start at 2. The file is created on demand only when custom properties are added.
This class provides 13 methods for working with CustomPropertiesPart objects in .NET programs.
Available methods include: Clear, Contains, EnsureContentType, EnsureRelationship, GetName, GetValue, Parse, ParseFiletime, ReadValue, Remove, Save, SetValue, and 1 additional methods.
All exported members are accessible to any .NET application after installing the Aspose.Slides FOSS for .NET package.
Properties: Count, PartName.
Description
CustomPropertiesPart is a class in the Aspose.Slides FOSS library for .NET that exposes 13 methods and 2 properties for programmatic use.
The class also provides the Count property (gets the count), the PartName property (gets the part name).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Count | int | Read | Gets the count. |
PartName | string | Read | Gets the part name. |
Methods
| Signature | Description |
|---|---|
Contains(name: string) | true if the property exists; otherwise, false. |
Parse() | Parses the docProps/custom.xml part from the package. |
ReadValue(propEl: XElement) | The typed value, or null if no recognized value type is found. |
ParseFiletime(text: string?) | The parsed , or null if the input is null, empty, or invalid. |
GetName(index: int) | Thrown when the index is out of range. |
GetValue(name: string) | The property value, or null if not found. |
SetValue(name: string, value: object) | The property value (string, int, double, bool, or DateTime). |
Remove(name: string) | true if the property was removed; false if it did not exist. |
Clear() | Removes all custom properties. |
Save() | Serializes the custom properties back to the OPC package. Only writes if properties have been modified. Removes the part if no properties remain. |
WriteValue(propEl: XElement, value: object) | The typed value to write. |
EnsureContentType() | Ensures [Content_Types].xml has an override entry for docProps/custom.xml. |
EnsureRelationship() | Ensures _rels/.rels has a relationship entry for docProps/custom.xml. |