Class SerializationExtensions
Utilities related to the (de)serialization.
Inheritance
Namespace: Telerik.Windows.Controls.Diagrams
Assembly: Telerik.Windows.Controls.Diagrams.dll
Syntax
public static class SerializationExtensions : Object
Methods
DeserializePrimitives(Control, SerializationInfo)
Deserializes some primitive properties of a control.
Declaration
public static void DeserializePrimitives(this Control control, SerializationInfo info)
Parameters
System.Windows.Controls.Control
control
The control. |
SerializationInfo
info
The serialization info. |
FromOpenTypeWeight(FontWeight, Int32)
Returns a weight corresponding to the serialized number.
Declaration
public static FontWeight FromOpenTypeWeight(this FontWeight weight, int number)
Parameters
System.Windows.FontWeight
weight
The weight. |
System.Int32
number
The number. |
Returns
System.Windows.FontWeight
|
GetBoolean(String)
Returns a boolean value of the given string.
Declaration
public static bool GetBoolean(string serializationValue)
Parameters
System.String
serializationValue
The serialized boolean. |
Returns
System.Boolean
|
GetBrush(Object, String)
Returns a brush from the SerializationInfo data.
Declaration
public static Brush GetBrush(object data, string nodeName)
Parameters
System.Object
data
The data representing a brush; which can be a simple color or a gradient.. |
System.String
nodeName
Name of the node. |
Returns
System.Windows.Media.Brush
|
GetBrushInfo(Brush, String)
Converts the brush to a serialized form which can be added to the buckets of the SerializationInfo.
Declaration
public static object GetBrushInfo(this Brush brush, string nodeName)
Parameters
System.Windows.Media.Brush
brush
The brush. |
System.String
nodeName
Name of the node. |
Returns
System.Object
|
See Also
GetThickness(String)
Returns a Thickness on the basis of the given string.
Declaration
public static Thickness GetThickness(string serializationValue)
Parameters
System.String
serializationValue
The serialized thickness. |
Returns
System.Windows.Thickness
|
See Also
GetThicknessInfo(Thickness)
Returns a serialized form of the given thickness.
Declaration
public static string GetThicknessInfo(this Thickness thickness)
Parameters
System.Windows.Thickness
thickness
The thickness. |
Returns
System.String
|
See Also
SerializePrimitives(Control, SerializationInfo)
Serializes some primitive properties of a control.
Declaration
public static void SerializePrimitives(this Control control, SerializationInfo info)
Parameters
System.Windows.Controls.Control
control
The control. |
SerializationInfo
info
The serialization info. |
ToOpenTypeWeight(FontWeight)
Returns an integer representation of the weight and implements the missing method found in WPF.
Declaration
public static int ToOpenTypeWeight(this FontWeight weight)
Parameters
System.Windows.FontWeight
weight
The weight. |
Returns
System.Int32
|