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

This class supports the design-time and XAML-related conversion from theme objects to strings and vice versa.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
[Obsolete("Will be removed Q3 2012", false)]
public class ThemeValueSerializer : ValueSerializer

Inheritance: objectThemeValueSerializer

Constructors

Initializes a new instance of the ThemeValueSerializer class.

C#
public ThemeValueSerializer()

Methods

Determines whether the specified string can be converted to an instance of the type that the implementation of supports.

C#
public override bool CanConvertFromString(string value, IValueSerializerContext context)
Parameters:valuestring

String to evaluate for conversion.

contextIValueSerializerContext

Context information that is used for conversion.

Returns:

bool

True if the value can be converted; otherwise, false.

Determines whether the specified object can be converted into a string.

C#
public override bool CanConvertToString(object value, IValueSerializerContext context)
Parameters:valueobject

The object to evaluate for conversion.

contextIValueSerializerContext

Context information that is used for conversion.

Returns:

bool

True if the value can be converted into a string; otherwise, false.

Converts a string to an instance of the type that the implementation of supports.

C#
public override object ConvertFromString(string value, IValueSerializerContext context)
Parameters:valuestring

The string to convert.

contextIValueSerializerContext

Context information that is used for conversion.

Returns:

object

A new instance of the type that the implementation of supports based on the supplied value.

Exceptions:

NotSupportedException

value cannot be converted.

Converts the specified object to a string.

C#
public override string ConvertToString(object value, IValueSerializerContext context)
Parameters:valueobject

The object to convert into a string.

contextIValueSerializerContext

Context information that is used for conversion.

Returns:

string

A string representation of the specified object.

Exceptions:

NotSupportedException

value cannot be converted.