ChartSerializer.Load Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Loads serialized data into the Chart control.
Overloads
Load(XmlReader) |
Loads serialized data into the control from an object derived from the XmlReader class. |
Load(String) |
Loads serialized data saved to disk into the Chart control. |
Load(Stream) |
Loads serialized data into the control from an object derived from the Stream class. |
Load(TextReader) |
Loads serialized data into the control from a reader object that derives from the TextReader class. |
Load(XmlReader)
Loads serialized data into the control from an object derived from the XmlReader class.
public:
void Load(System::Xml::XmlReader ^ reader);
public void Load (System.Xml.XmlReader reader);
member this.Load : System.Xml.XmlReader -> unit
Public Sub Load (reader As XmlReader)
Parameters
- reader
- XmlReader
An object from which to read the persisted data. The object is derived from the XmlReader class, and can be a .NET Framework object or a user-defined object.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, by default serializable properties are first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. If you set the Content, SerializableContent or NonSerializableContent properties, a specific set of properties can be loaded.
When you use this definition, the format must be XML; it can be changed with the Format property.
When you work with XML format text files, for simplicity use the Load method instead.
Applies to
Load(String)
Loads serialized data saved to disk into the Chart control.
public:
void Load(System::String ^ fileName);
public void Load (string fileName);
member this.Load : string -> unit
Public Sub Load (fileName As String)
Parameters
- fileName
- String
The relative or absolute path of the file used to store the serialized data. If a relative path is specified, the path will be relative to the current directory.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, serializable properties are, by default, first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. To load specific serialized properties, set the Content , SerializableContent or NonSerializableContent properties before loading the data.
Note that when data is saved using a Save
method, only those properties that have non-default values are actually serialized.
Applies to
Load(Stream)
Loads serialized data into the control from an object derived from the Stream class.
public:
void Load(System::IO::Stream ^ stream);
public void Load (System.IO.Stream stream);
member this.Load : System.IO.Stream -> unit
Public Sub Load (stream As Stream)
Parameters
- stream
- Stream
An object derived from the Stream class, for example, a MemoryStream object.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, serializable properties are, by default, first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. To load specific serialized properties, set the Content , SerializableContent or NonSerializableContent properties before loading the data.
Note that when data is saved using a Save
method, only those properties that have non-default values are actually serialized.
Applies to
Load(TextReader)
Loads serialized data into the control from a reader object that derives from the TextReader class.
public:
void Load(System::IO::TextReader ^ reader);
public void Load (System.IO.TextReader reader);
member this.Load : System.IO.TextReader -> unit
Public Sub Load (reader As TextReader)
Parameters
- reader
- TextReader
A reader, such as StringReader, that is derived from the abstract TextReader class.
Remarks
Call this method to load serialized data into the Chart control.
When a load operation occurs, by default the serializable properties are first reset to their default values before they are set to the persisted values, if saved. To change this behavior, use the IsResetWhenLoading property.
By default, all serialized chart properties will be loaded. By setting the Content, SerializableContent or NonSerializableContent properties, a specific set of properties can be loaded.
If you use this definition, note that the format, which is set by the Format property, must be XML.
If the ViewStateData property of the Chart control is used to persist state, this method can be used to load the serialized data that is posted by the client back to the Chart control.