[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Chart.Exchange.Persistence.FromXml

FromXml Method

FromXml(ISharpGraph, XmlElement)

Reconstructs a SharpGraph object with a specified state from an XML encoding.

Use "strict" attribute of root element "SharpGraph" in xml files to control error handling behaviour. This attribute is false by default. If true xml import process will stop once it finds first error and throw an exception. If false it will mutually continue.

Declaration
public static void FromXml(ISharpGraph sharpChartControl, XmlElement rootElement)
Parameters
Type Name Description
ISharpGraph sharpChartControl
XmlElement rootElement

The XML encoding to use to reconstruct the SharpGraph object.

FromXml(ISharpGraph, XmlElement, bool)

Reconstructs a chart from its XML representation, populating the supplied control. Use the includeData flag to control whether bound data is restored along with the layout.

Declaration
public static void FromXml(ISharpGraph sharpChartControl, XmlElement rootElement, bool includeData)
Parameters
Type Name Description
ISharpGraph sharpChartControl

The chart control to populate from the XML.

XmlElement rootElement

The root XML element previously produced when the chart was serialized.

bool includeData

true to also restore data-related content; false to restore only the chart definition.

Remarks

If the root element carries a strict attribute set to true, deserialization failures are rethrown; otherwise individual property failures are ignored and import continues.

FromXml(ISharpGraph, string)

Reconstructs a SharpGraph object with a specified state from an XML encoding.

Declaration
public static void FromXml(ISharpGraph sharpChartControl, string fileName)
Parameters
Type Name Description
ISharpGraph sharpChartControl
string fileName

The XML file name to use to reconstruct the SharpGraph object.

FromXml(ISharpGraph, string, bool)

Reconstructs a chart from an XML file, populating the supplied control. Use the includeData flag to control whether bound data is restored along with the layout.

Declaration
public static void FromXml(ISharpGraph sharpChartControl, string fileName, bool includeData)
Parameters
Type Name Description
ISharpGraph sharpChartControl

The chart control to populate from the file.

string fileName

The path of the XML file previously produced when the chart was serialized.

bool includeData

true to also restore data-related content; false to restore only the chart definition.