ValueSerializer Class

Abstract class to convert a type to and from a String.

Namespace:  System.Windows.Markup
Assembly:  WindowsBase (in WindowsBase.dll)

public abstract class ValueSerializer
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

The string the converter returns must be loss-less and the converter must always return the same string for a particular value. If a type converter does not meet these requirements, a custom ValueSerializer must be declared that meets the requirements or a null ValueSerializer must be associated with the type.

A null ValueSerializer indicates the type converter should be ignored.

Implementation of ValueSerializer should avoid throwing exceptions. Any exceptions thrown could terminate serialization.

System.Object
  System.Windows.Markup.ValueSerializer
    System.Windows.Converters.Int32RectValueSerializer
    System.Windows.Converters.PointValueSerializer
    System.Windows.Converters.RectValueSerializer
    System.Windows.Converters.SizeValueSerializer
    System.Windows.Converters.VectorValueSerializer
    System.Windows.Input.KeyGestureValueSerializer
    System.Windows.Input.KeyValueSerializer
    System.Windows.Input.ModifierKeysValueSerializer
    System.Windows.Input.MouseActionValueSerializer
    System.Windows.Input.MouseGestureValueSerializer
    System.Windows.Markup.DateTimeValueSerializer
    System.Windows.Media.Converters.BrushValueSerializer
    System.Windows.Media.Converters.DoubleCollectionValueSerializer
    System.Windows.Media.Converters.GeometryValueSerializer
    System.Windows.Media.Converters.Int32CollectionValueSerializer
    System.Windows.Media.Converters.MatrixValueSerializer
    System.Windows.Media.Converters.PathFigureCollectionValueSerializer
    System.Windows.Media.Converters.PointCollectionValueSerializer
    System.Windows.Media.Converters.TransformValueSerializer
    System.Windows.Media.Converters.VectorCollectionValueSerializer
    System.Windows.Media.FontFamilyValueSerializer
    System.Windows.Media.ImageSourceValueSerializer
    System.Windows.Media.Media3D.Converters.Matrix3DValueSerializer
    System.Windows.Media.Media3D.Converters.Point3DCollectionValueSerializer
    System.Windows.Media.Media3D.Converters.Point3DValueSerializer
    System.Windows.Media.Media3D.Converters.Point4DValueSerializer
    System.Windows.Media.Media3D.Converters.QuaternionValueSerializer
    System.Windows.Media.Media3D.Converters.Rect3DValueSerializer
    System.Windows.Media.Media3D.Converters.Size3DValueSerializer
    System.Windows.Media.Media3D.Converters.Vector3DCollectionValueSerializer
    System.Windows.Media.Media3D.Converters.Vector3DValueSerializer

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft