Class
XmlPropertySetting

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:

cs-api-definition
[TypeConverter(typeof(ExpandableObjectConverter))]
public class XmlPropertySetting : ISerializationValidatable

Inheritance: objectXmlPropertySetting

Derived Classes: XmlAnimatedPropertySetting

Implements: ISerializationValidatable

Constructors

XmlPropertySetting()

Declaration

cs-api-definition
public XmlPropertySetting()

XmlPropertySetting(RadProperty, object)

Declaration

cs-api-definition
public XmlPropertySetting(RadProperty property, object value)

Parameters

property

RadProperty

value

object

Properties

Property

Gets or sets a string value indicating the property. For example, Telerik.WinControls.VisualElement.ForeColor.

Declaration

cs-api-definition
public string Property { get; set; }

Property Value

string

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

cs-api-definition
[TypeConverter(typeof(SettingValueConverter))]
[SerializationConverter(typeof(XmlPropertySettingValueConverter))]
public object Value { get; set; }

Property Value

object

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

cs-api-definition
[Browsable(false)]
public string ValueString { get; set; }

Property Value

string

Methods

Deserialize()

Declaration

cs-api-definition
public virtual IPropertySetting Deserialize()

Returns

IPropertySetting

DeserializeProperty(string)

Deserializes the property given as a string. For example, Telerik.WinControls.VisualElement.ForeColor.

Declaration

cs-api-definition
public static RadProperty DeserializeProperty(string property)

Parameters

property

string

Returns

RadProperty

DeserializePropertySafe(string)

Deserializes the property given as a string. For example, Telerik.WinControls.VisualElement.ForeColor.

Declaration

cs-api-definition
public static RadProperty DeserializePropertySafe(string property)

Parameters

property

string

Returns

RadProperty

DeserializeValue(PropertyDescriptor, string, string, bool)

Declaration

cs-api-definition
public static object DeserializeValue(PropertyDescriptor prop, string value, string propertyDisplayName, bool throwOnError)

Parameters

prop

PropertyDescriptor

value

string

propertyDisplayName

string

throwOnError

bool

Returns

object

DeserializeValue(RadProperty, string)

Deserializes the given dependency property with the given value.

Declaration

cs-api-definition
public static object DeserializeValue(RadProperty property, string value)

Parameters

property

RadProperty

value

string

Returns

object

DeserializeValue(RadProperty, string, bool)

Declaration

cs-api-definition
public static object DeserializeValue(RadProperty property, string value, bool throwOnError)

Parameters

property

RadProperty

value

string

throwOnError

bool

Returns

object

DeserializeValue(Type, string, string)

Declaration

cs-api-definition
public static object DeserializeValue(Type propertyType, string value, string propertyDisplayName)

Parameters

propertyType

Type

value

string

propertyDisplayName

string

Returns

object

GetConvertedValue(RadProperty, object)

Declaration

cs-api-definition
protected object GetConvertedValue(RadProperty property, object value)

Parameters

property

RadProperty

value

object

Returns

object

GetDeserializedProperty()

Retrieves the deserialized property.

Declaration

cs-api-definition
public RadProperty GetDeserializedProperty()

Returns

RadProperty

GetPropertyName()

Retrieves the name of the property.

Declaration

cs-api-definition
public string GetPropertyName()

Returns

string

SerializeValue(PropertyDescriptor, object, string)

Declaration

cs-api-definition
public static string SerializeValue(PropertyDescriptor prop, object value, string propertyDisplayName)

Parameters

prop

PropertyDescriptor

value

object

propertyDisplayName

string

Returns

string

SerializeValue(RadProperty, object)

Serializes the given dependency property with the given value.

Declaration

cs-api-definition
public static string SerializeValue(RadProperty property, object value)

Parameters

property

RadProperty

value

object

Returns

string

SetSerializeValueAsString(bool)

Declaration

cs-api-definition
public void SetSerializeValueAsString(bool value)

Parameters

value

bool

ToString()

Retrieves a string representation of the class.

Declaration

cs-api-definition
public override string ToString()

Returns

string

Overrides object.ToString()