ClassXmlPropertySetting
Represents a property setting. Each property of Telerik controls can be serialized and deserialized through an instance of this class. The XMLPropertySetting instance describes the affected control, its property, and the current value. XmlPropertySetting is very similar to CSS style properties.
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
[TypeConverter(typeof(ExpandableObjectConverter))]
public class XmlPropertySetting : ISerializationValidatable
Inheritance: objectXmlPropertySetting
Derived Classes:
Implements:
Constructors
XmlPropertySetting()
Declaration
public XmlPropertySetting()
XmlPropertySetting(RadProperty, object)
Declaration
public XmlPropertySetting(RadProperty property, object value)
Parameters
property
value
Properties
Property
Gets or sets a string value indicating the property. For example, Telerik.WinControls.VisualElement.ForeColor.
Value
Gets or sets an object value indicating the value of the property. For example, the value of Telerik.WinControls.VisualElement.ForeColor property could be "navy" or "128, 0, 255, 63".
Declaration
[TypeConverter(typeof(SettingValueConverter))]
[SerializationConverter(typeof(XmlPropertySettingValueConverter))]
public object Value { get; set; }
Property Value
Remarks
Here is how XmlPropertySetting determines whether to serialize Value or ValueString property when used in ThemeComponent with CodeDom serialization.
If the property belongs to an object from System, Telerik.WinControl or Telerik.WinCotnrols.UI assembly then Value will be serialized (the actual object). For values that are defined in other assemblies ValueString will be serialized. Tthis is Value, serialized as string using the TypeConverter specified by the corresponing RadProperty. This is important for late-binding for types declared in different assemblies: egg. Docking Otherwise a problem will occur when adding a ThemeComponent on the Form in a project which does not reference Docking or Grid, etc, or custom controls assembly.
For xml serializtion, property serialize always as string using the TypeConverter specified by the corresponing RadProperty.
ValueString
Gets or sets the value serialized to string using the corresponding property TypeConverter. Generally used in rear cases by CodeDom Serializer, if theme is serializaed to CodeDom
Declaration
[Browsable(false)]
public string ValueString { get; set; }
Property Value
Methods
Deserialize()
Declaration
public virtual IPropertySetting Deserialize()
Returns
DeserializeProperty(string)
Deserializes the property given as a string. For example, Telerik.WinControls.VisualElement.ForeColor.
Declaration
public static RadProperty DeserializeProperty(string property)
Parameters
property
Returns
DeserializePropertySafe(string)
Deserializes the property given as a string. For example, Telerik.WinControls.VisualElement.ForeColor.
Declaration
public static RadProperty DeserializePropertySafe(string property)
Parameters
property
Returns
DeserializeValue(PropertyDescriptor, string, string, bool)
Declaration
public static object DeserializeValue(PropertyDescriptor prop, string value, string propertyDisplayName, bool throwOnError)
Parameters
prop
value
propertyDisplayName
throwOnError
Returns
DeserializeValue(RadProperty, string)
Deserializes the given dependency property with the given value.
Declaration
public static object DeserializeValue(RadProperty property, string value)
Parameters
property
value
Returns
DeserializeValue(RadProperty, string, bool)
Declaration
public static object DeserializeValue(RadProperty property, string value, bool throwOnError)
Parameters
property
value
throwOnError
Returns
GetConvertedValue(RadProperty, object)
Declaration
protected object GetConvertedValue(RadProperty property, object value)
Parameters
property
value
Returns
GetDeserializedProperty()
Retrieves the deserialized property.
GetPropertyName()
Retrieves the name of the property.
SerializeValue(PropertyDescriptor, object, string)
Declaration
public static string SerializeValue(PropertyDescriptor prop, object value, string propertyDisplayName)
Parameters
prop
value
propertyDisplayName
Returns
SerializeValue(RadProperty, object)
Serializes the given dependency property with the given value.
Declaration
public static string SerializeValue(RadProperty property, object value)
Parameters
property
value
Returns
SetSerializeValueAsString(bool)
Declaration
public void SetSerializeValueAsString(bool value)
Parameters
value
ToString()
Retrieves a string representation of the class.