Interface IDocumentProperty
Represents the custom or built-in document property.
Namespace: Syncfusion.Presentation
Assembly: Syncfusion.Presentation.NET.dll
Syntax
public interface IDocumentProperty
Properties
Boolean
Gets or sets the boolean value.
Declaration
bool Boolean { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set a Boolean value.
documentProperty.Boolean = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set a Boolean value.
documentProperty.[Boolean] = True
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
BuiltInProperty
Gets the property id for the built-in property. Read-only.
Declaration
BuiltInProperty BuiltInProperty { get; }
Property Value
Type |
---|
BuiltInProperty |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set a Boolean value.
documentProperty.Boolean = true;
//Get the built-in property, it is read only
BuiltInProperty builtinProp = documentProperty.BuiltInProperty;
//Save the presentation
presentation.Save("Sample.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set a Boolean value.
documentProperty.[Boolean] = True
'Get the built-in property, it is read only
Dim builtinProp As BuiltInProperty = documentProperty.BuiltInProperty
'Save the presentation
presentation__1.Save("Sample.pptx")
'Close the presentation.
presentation__1.Close()
DateTime
Gets or sets the DateTime value.
Declaration
DateTime DateTime { get; set; }
Property Value
Type |
---|
System.DateTime |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set a date time.
documentProperty.DateTime = DateTime.Now;
//Save the presentation
presentation.Save("DateTime.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set a date time.
documentProperty.DateTime = DateTime.Now
'Save the presentation
presentation__1.Save("DateTime.pptx")
'Close the presentation.
presentation__1.Close()
Double
Gets or sets the double value.
Declaration
double Double { get; set; }
Property Value
Type |
---|
System.Double |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set a double value.
documentProperty.Double = 345.00;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set a double value.
documentProperty.[Double] = 345.0
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
Int32
Gets or sets the 4-bytes signed integer value.
Declaration
int Int32 { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set value for Int32
documentProperty.Int32 = 25;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set value for Int32
documentProperty.Int32 = 25
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
Integer
Gets or sets the integer value.
Declaration
int Integer { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set the integer property
documentProperty.Integer = 130;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set integer property
documentProperty.[Integer] = 130
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
IsBuiltIn
Indicates whether the property is built-in or not. Read-only.
Declaration
bool IsBuiltIn { get; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set a Boolean value.
documentProperty.Boolean = true;
//Get boolean value to check if built-in property or not, it is read only
bool value = documentProperty.IsBuiltIn;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set a Boolean value.
documentProperty.[Boolean] = True
'Get boolean value to check if built-in property or not, it is read only
Dim value As Boolean = documentProperty.IsBuiltIn
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
LinkSource
Gets or sets the source of a linked custom document property.
Declaration
string LinkSource { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set the link source
documentProperty.LinkSource = "www.google.com";
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set the link source
documentProperty.LinkSource = "www.google.com"
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
LinkToContent
Gets or sets a boolean value indicates whether the property is linked to the content.
Declaration
bool LinkToContent { get; set; }
Property Value
Type |
---|
System.Boolean |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set the link source
documentProperty.LinkSource = "www.google.com";
//Set the link to content
documentProperty.LinkToContent = true;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set the link source
documentProperty.LinkSource = "www.google.com"
'Set the link to content
documentProperty.LinkToContent = True
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
Name
Gets the property name. Read-only.
Declaration
string Name { get; }
Property Value
Type |
---|
System.String |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set a Boolean value.
documentProperty.Boolean = true;
//Get the name of document property
string name = documentProperty.Name;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set a Boolean value.
documentProperty.[Boolean] = True
'Get the name of document property
Dim name As String = documentProperty.Name
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
Text
Gets or sets the string value.
Declaration
string Text { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set the text
documentProperty.Text = "Document Property";
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set the text
documentProperty.Text = "Document Property"
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
TimeSpan
Gets or sets the TimeSpan value.
Declaration
TimeSpan TimeSpan { get; set; }
Property Value
Type |
---|
System.TimeSpan |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set the timespan value
documentProperty.TimeSpan = TimeSpan.FromMinutes(20.30);
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set the timespan value
documentProperty.TimeSpan = TimeSpan.FromMinutes(20.3)
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()
Value
Gets or sets the property value.
Declaration
object Value { get; set; }
Property Value
Type |
---|
System.Object |
Examples
//Create a new presentation
IPresentation presentation = Presentation.Create();
//Retrieve the custom document properties.
ICustomDocumentProperties customDocumentProperties = presentation.CustomDocumentProperties;
//Add a new document property.
IDocumentProperty documentProperty = customDocumentProperties.Add("PropertyA");
//Set the timespan value
documentProperty.TimeSpan = TimeSpan.FromMinutes(20.30);
//Set the value of document property
documentProperty.Value = 100;
//Save the presentation
presentation.Save("Output.pptx");
//Close the presentation.
presentation.Close();
'Create a new presentation
Dim presentation__1 As IPresentation = Presentation.Create()
'Retrieve the custom document properties.
Dim customDocumentProperties As ICustomDocumentProperties = presentation__1.CustomDocumentProperties
'Add a new document property.
Dim documentProperty As IDocumentProperty = customDocumentProperties.Add("PropertyA")
'Set the timespan value
documentProperty.TimeSpan = TimeSpan.FromMinutes(20.3)
//Set the value of document property
documentProperty.Value = 100;
'Save the presentation
presentation__1.Save("Output.pptx")
'Close the presentation.
presentation__1.Close()