Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight 3
TypeConverter Class

  Switch on low bandwidth view
.NET Framework Class Library for Silverlight
TypeConverter Class

Provides a unified way of converting types of values to other types, as well as for accessing standard values and subproperties.

Namespace:  System.ComponentModel
Assembly:  System (in System.dll)
Visual Basic (Declaration)
Public Class TypeConverter
Visual Basic (Usage)
Dim instance As TypeConverter
C#
public class TypeConverter

The most common type of converter is one that converts to and from a text representation. The type converter for a class is bound to the class with a TypeConverterAttribute. Unless this attribute is overridden, all classes that inherit from this class use the same type converter as the base class.

The most common use of TypeConverter in Silverlight is to provide the processing for setting XAML attributes and generating object values, both for Silverlight defined classes and custom classes. See TypeConverters and XAML.

For supporting the string creation syntax of custom types that are specified as attributes in XAML, you should at a minimum implement CanConvertFrom(ITypeDescriptorContext, Type) and ConvertFrom(ITypeDescriptorContext, CultureInfo, Object) in your TypeConverter class.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker