CustomPropertiesPart

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.

Properties

NameTypeAccessDescription
CountintReadGets the number of custom properties stored in the part
PartNamestringReadGets the part name (path) of the custom properties XML within the package

Methods

SignatureDescription
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.

See Also