New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
[TypeConverter(typeof(ExpandableObjectConverter))]
public class XmlPropertySetting : ISerializationValidatable

Inheritance: objectXmlPropertySetting

Derived Classes: XmlAnimatedPropertySetting

Implements: ISerializationValidatable

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

C#
public string Property { get; set; }

Constructors

C#
public XmlPropertySetting()
C#
public XmlPropertySetting(RadProperty property, object value)
Parameters:propertyRadPropertyvalueobject

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".

C#
[TypeConverter(typeof(SettingValueConverter))]
[SerializationConverter(typeof(XmlPropertySettingValueConverter))]
public object Value { get; set; }
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.

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

C#
[Browsable(false)]
public string ValueString { get; set; }

Methods

C#
public virtual IPropertySetting Deserialize()
Returns:

IPropertySetting

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

C#
public static RadProperty DeserializeProperty(string property)
Parameters:propertystringReturns:

RadProperty

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

C#
public static RadProperty DeserializePropertySafe(string property)
Parameters:propertystringReturns:

RadProperty

C#
public static object DeserializeValue(PropertyDescriptor prop, string value, string propertyDisplayName, bool throwOnError)
Parameters:propPropertyDescriptorvaluestringpropertyDisplayNamestringthrowOnErrorboolReturns:

object

C#
public static object DeserializeValue(RadProperty property, string value, bool throwOnError)
Parameters:propertyRadPropertyvaluestringthrowOnErrorboolReturns:

object

Deserializes the given dependency property with the given value.

C#
public static object DeserializeValue(RadProperty property, string value)
Parameters:propertyRadPropertyvaluestringReturns:

object

C#
public static object DeserializeValue(Type propertyType, string value, string propertyDisplayName)
Parameters:propertyTypeTypevaluestringpropertyDisplayNamestringReturns:

object

C#
protected object GetConvertedValue(RadProperty property, object value)
Parameters:propertyRadPropertyvalueobjectReturns:

object

Retrieves the deserialized property.

C#
public RadProperty GetDeserializedProperty()
Returns:

RadProperty

Retrieves the name of the property.

C#
public string GetPropertyName()
Returns:

string

C#
public static string SerializeValue(PropertyDescriptor prop, object value, string propertyDisplayName)
Parameters:propPropertyDescriptorvalueobjectpropertyDisplayNamestringReturns:

string

Serializes the given dependency property with the given value.

C#
public static string SerializeValue(RadProperty property, object value)
Parameters:propertyRadPropertyvalueobjectReturns:

string

C#
public void SetSerializeValueAsString(bool value)
Parameters:valuebool

Retrieves a string representation of the class.

C#
public override string ToString()
Returns:

string

Overrides: object.ToString()