XmlPropertySetting
Definition
Namespace:Telerik.WinControls
Assembly:Telerik.WinControls.dll
Syntax:
[TypeConverter(typeof(ExpandableObjectConverter))]
public class XmlPropertySetting : ISerializationValidatable
Inheritance: objectXmlPropertySetting
Derived Classes:
Implements:
Constructors
public XmlPropertySetting()
public XmlPropertySetting(RadProperty property, object value)
Properties
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".
[TypeConverter(typeof(SettingValueConverter))]
[SerializationConverter(typeof(XmlPropertySettingValueConverter))]
public object Value { get; set; }
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.
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
[Browsable(false)]
public string ValueString { get; set; }
Methods
Deserializes the property given as a string. For example, Telerik.WinControls.VisualElement.ForeColor.
Deserializes the property given as a string. For example, Telerik.WinControls.VisualElement.ForeColor.
public static RadProperty DeserializePropertySafe(string property)
public static object DeserializeValue(PropertyDescriptor prop, string value, string propertyDisplayName, bool throwOnError)
public static object DeserializeValue(RadProperty property, string value, bool throwOnError)
Deserializes the given dependency property with the given value.
public static object DeserializeValue(RadProperty property, string value)
protected object GetConvertedValue(RadProperty property, object value)
Retrieves the deserialized property.
Retrieves the name of the property.
public static string SerializeValue(PropertyDescriptor prop, object value, string propertyDisplayName)
Serializes the given dependency property with the given value.
public static string SerializeValue(RadProperty property, object value)
Retrieves a string representation of the class.