Spread ASP.NET 6.0 Product Documentation
Deserialize Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > NamedStyle Class : Deserialize Method


r
XmlNodeReader from which to load the object

Glossary Item Box

Loads the style object from XML.

Syntax

Visual Basic (Declaration) 
Public Overrides Function Deserialize( _
   ByVal r As XmlNodeReader _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As NamedStyle
Dim r As XmlNodeReader
Dim value As Boolean
 
value = instance.Deserialize(r)
C# 
public override bool Deserialize( 
   XmlNodeReader r
)

Parameters

r
XmlNodeReader from which to load the object

Return Value

true if successful; false otherwise

Example

This example deserializes the NamedStyle object.
C#Copy Code
FarPoint.Web.Spread.NamedStyle ns = new FarPoint.Web.Spread.NamedStyle();
FarPoint.Web.Spread.StyleInfo si = new FarPoint.Web.Spread.StyleInfo();
si.BackColor = Color.LightBlue;
ns.CopyFrom(si);
fpSpread1.ActiveSheetView.DefaultStyle = ns;
bool b;
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
System.Xml.XmlNode node; 
System.Xml.XmlNodeReader r;
doc.Load("..\\files\\mystyle.xml");
node = doc.FirstChild;
while (!node.Name.Equals("Style"))
    node = node.NextSibling;
r = new System.Xml.XmlNodeReader(node);
r.Read();
b = ns.Deserialize(r);
listBox1.Items.Add(b.ToString());
Visual BasicCopy Code
Dim ns As New FarPoint.Web.Spread.NamedStyle()
Dim si As New FarPoint.Web.Spread.StyleInfo()
si.BackColor = Color.LightBlue
ns.CopyFrom(si)
FpSpread1.ActiveSheetView.DefaultStyle = ns
Dim b As Boolean
Dim doc As New System.Xml.XmlDocument()
Dim node As System.Xml.XmlNode
Dim r As System.Xml.XmlNodeReader
doc.Load("..\files\mystyle.xml")
node = doc.FirstChild
While Not (node.Name.Equals("Style"))
 node = node.NextSibling
End While
r = New System.Xml.XmlNodeReader(node)
r.Read()
b = ns.Deserialize(r)
ListBox1.Items.Add(b)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.