Class UserProperties
Namespace: Aspose.Page
Assembly: Aspose.Page.dll (25.8.0)
Special property class which allows typed properties to be set and returned. It also allows the hookup of two default property objects to be searched if this property object does not contain the property.
public class UserProperties : Dictionary<string, object="">, IDictionary<string, object="">, ICollection<keyvaluepair<string, object="">>, IDictionary, ICollection, IReadOnlyDictionary<string, object="">, IReadOnlyCollection<keyvaluepair<string, object="">>, IEnumerable<keyvaluepair<string, object="">>, IEnumerable, ISerializable, IDeserializationCallbackInheritance
object ← Dictionary<string, object=""> ← UserProperties
Implements
IDictionary<string, object=""> , ICollection<keyvaluepair<string, object="">> , IDictionary , ICollection , IReadOnlyDictionary<string, object=""> , IReadOnlyCollection<keyvaluepair<string, object="">> , IEnumerable<keyvaluepair<string, object="">> , IEnumerable , ISerializable , IDeserializationCallback
Inherited Members
Dictionary<string, object="">.Add(string, object) , Dictionary<string, object="">.Clear() , Dictionary<string, object="">.ContainsKey(string) , Dictionary<string, object="">.ContainsValue(object) , Dictionary<string, object="">.GetEnumerator() , Dictionary<string, object="">.OnDeserialization(object?) , Dictionary<string, object="">.Remove(string) , Dictionary<string, object="">.Remove(string, out object) , Dictionary<string, object="">.TryGetValue(string, out object) , Dictionary<string, object="">.TryAdd(string, object) , Dictionary<string, object="">.EnsureCapacity(int) , Dictionary<string, object="">.TrimExcess() , Dictionary<string, object="">.TrimExcess(int) , Dictionary<string, object="">.Comparer , Dictionary<string, object="">.Count , Dictionary<string, object="">.Keys , Dictionary<string, object="">.Values , Dictionary<string, object="">.this[string] , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
UserProperties()
Initializes an empty instance of UserProperties class.
public UserProperties()UserProperties(Dictionary<string, object="">)
Initializes an of UserProperties class with default values.
public UserProperties(Dictionary<string, object=""> defaults)Parameters
defaults Dictionary
<
string
, object
>
Default properties values.
UserProperties(Dictionary<string, object="">, Dictionary<string, object="">)
Constructs UserProperties with a defaults and altDefaults table, which are searched in that order.
public UserProperties(Dictionary<string, object=""> defaults, Dictionary<string, object=""> altDefaults)Parameters
defaults Dictionary
<
string
, object
>
Default properties values.
altDefaults Dictionary
<
string
, object
>
An alternative properties values.
Fields
altDefaults
An alternative properties values.
protected Dictionary<string, object=""> altDefaultsField Value
Dictionary < string , object >
Properties
Properties
Copies properties, including its defaults into this UserProperties
public virtual Dictionary<string, object=""> Properties { set; }Property Value
Dictionary < string , object >
Methods
GetProperty(string)
Gets string property value.
public virtual string GetProperty(string key)Parameters
key string
The name of property.
Returns
Property value.
GetProperty(string, string)
Gets string property value. If requested property is absent, returns provided default value.
public virtual string GetProperty(string key, string defValue)Parameters
key string
The name of property.
defValue string
Default value of property.
Returns
Property value.
GetPropertyColor(string)
Gets color property value.
public virtual Color GetPropertyColor(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertyColor(string, Color)
Gets color property value. If requested property is absent, returns provided default value.
public virtual Color GetPropertyColor(string key, Color defValue)Parameters
key string
The name of property.
defValue Color
Default value of property.
Returns
Property value.
GetPropertyDouble(string)
Gets double property value.
public virtual double GetPropertyDouble(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertyDouble(string, double)
Gets double property value. If requested property is absent, returns provided default value.
public virtual double GetPropertyDouble(string key, double defValue)Parameters
key string
The name of property.
defValue double
Default value of property.
Returns
Property value.
GetPropertyFloat(string)
Gets float property value.
public virtual float GetPropertyFloat(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertyFloat(string, float)
Gets float property value. If requested property is absent, returns provided default value.
public virtual float GetPropertyFloat(string key, float defValue)Parameters
key string
The name of property.
defValue float
Default value of property.
Returns
Property value.
GetPropertyInt(string)
Gets integer property value.
public virtual int GetPropertyInt(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertyInt(string, int)
Gets integer property value. If requested property is absent, returns provided default value.
public virtual int GetPropertyInt(string key, int defValue)Parameters
key string
The name of property.
defValue int
Default value of property.
Returns
Property value.
GetPropertyMargins(string)
Gets margins property value.
public virtual Margins GetPropertyMargins(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertyMargins(string, Margins)
Gets margins property value. If requested property is absent, returns provided default value.
public virtual Margins GetPropertyMargins(string key, Margins defValue)Parameters
key string
The name of property.
defValue Margins
Default value of property.
Returns
Property value.
GetPropertyMatrix(string)
Gets matrix property value.
public virtual Matrix GetPropertyMatrix(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertyMatrix(string, Matrix)
Gets matrix property value. If requested property is absent, returns provided default value.
public virtual Matrix GetPropertyMatrix(string key, Matrix defValue)Parameters
key string
The name of property.
defValue Matrix
Default value of property.
Returns
Property value.
GetPropertyRectangle(string)
Gets rectangle property value.
public virtual RectangleF GetPropertyRectangle(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertyRectangle(string, RectangleF)
Gets rectangle property value. If requested property is absent, returns provided default value.
public virtual RectangleF GetPropertyRectangle(string key, RectangleF defValue)Parameters
key string
The name of property.
defValue RectangleF
Default value of property.
Returns
Property value.
GetPropertySize(string)
Gets size property value.
public virtual Size GetPropertySize(string key)Parameters
key string
The name of property.
Returns
Property value.
GetPropertySize(string, Size)
Gets size property value. If requested property is absent, returns provided default value.
public virtual Size GetPropertySize(string key, Size defValue)Parameters
key string
The name of property.
defValue Size
Default value of property.
Returns
Property value.
GetPropertyStringArray(string)
Gets string array property value.
public virtual string[] GetPropertyStringArray(string key)Parameters
key string
The name of property.
Returns
string []
Property value.
GetPropertyStringArray(string, string[])
Gets string array property value. If requested property is absent, returns provided default value.
public virtual string[] GetPropertyStringArray(string key, string[] defValue)Parameters
key string
The name of property.
defValue string
[]
Default value of property.
Returns
string []
Property value.
IsProperty(string)
Gets boolean property value.
public virtual bool IsProperty(string key)Parameters
key string
The name of property.
Returns
Property value.
IsProperty(string, bool)
Gets boolean property value. If requested property is absent, returns provided default value.
public virtual bool IsProperty(string key, bool defValue)Parameters
key string
The name of property.
defValue bool
Default value of property.
Returns
Property value.
PrintProperties()
public virtual void PrintProperties()PropertyNames()
Returns properties names.
public virtual IEnumerator<string> PropertyNames()Returns
IEnumerator < string >
Enumerator of properties names.
SetProperty(string, string)
Sets string property value.
public virtual object SetProperty(string key, string value)Parameters
key string
The name of property.
value string
The value of property.
Returns
A property.
SetProperty(string, string[])
Sets string array property value.
public virtual object SetProperty(string key, string[] value)Parameters
key string
The name of property.
value string
[]
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, string[])
Sets string array property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, string[] value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value string
[]
The value of property.
Returns
A property.
SetProperty(string, Color)
Sets color property value.
public virtual object SetProperty(string key, Color value)Parameters
key string
The name of property.
value Color
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, Color)
Sets color property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, Color value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value Color
The value of property.
Returns
A property.
SetProperty(string, Rectangle)
Sets rectangle property value.
public virtual object SetProperty(string key, Rectangle value)Parameters
key string
The name of property.
value Rectangle
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, Rectangle)
Sets rectangle property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, Rectangle value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value Rectangle
The value of property.
Returns
A property.
SetProperty(string, Margins)
Sets margins property value.
public virtual object SetProperty(string key, Margins value)Parameters
key string
The name of property.
value Margins
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, Margins)
Sets margins property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, Margins value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value Margins
The value of property.
Returns
A property.
SetProperty(string, Size)
Sets size property value.
public virtual object SetProperty(string key, Size value)Parameters
key string
The name of property.
value Size
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, Size)
Sets size property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, Size value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value Size
The value of property.
Returns
A property.
SetProperty(string, int)
Sets integer property value.
public virtual object SetProperty(string key, int value)Parameters
key string
The name of property.
value int
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, int)
Sets integer property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, int value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value int
The value of property.
Returns
A property.
SetProperty(string, double)
Sets double property value.
public virtual object SetProperty(string key, double value)Parameters
key string
The name of property.
value double
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, double)
Sets double property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, double value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value double
The value of property.
Returns
A property.
SetProperty(string, float)
Sets float property value.
public virtual object SetProperty(string key, float value)Parameters
key string
The name of property.
value float
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, float)
Sets float property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, float value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value float
The value of property.
Returns
A property.
SetProperty(string, bool)
Sets boolean property value.
public virtual object SetProperty(string key, bool value)Parameters
key string
The name of property.
value bool
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, bool)
Sets boolean property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, bool value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value bool
The value of property.
Returns
A property.
SetProperty(string, Matrix)
Sets matrix property value.
public virtual object SetProperty(string key, Matrix value)Parameters
key string
The name of property.
value Matrix
The value of property.
Returns
A property.
SetProperty(Dictionary<string, object="">, string, Matrix)
Sets matrix property value in specified properties table.
public static object SetProperty(Dictionary<string, object=""> properties, string key, Matrix value)Parameters
properties Dictionary
<
string
, object
>
The properties table.
key string
The name of property.
value Matrix
The value of property.
Returns
A property. </string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></string,></keyvaluepair<string,></keyvaluepair<string,></string,></keyvaluepair<string,></string,></string,></keyvaluepair<string,></keyvaluepair<string,></string,></keyvaluepair<string,></string,></string,>