Gets or sets the type of chart content to be serialized.
Serializable content.
Visual Basic (Declaration) | |
---|---|
Public Property Content As SerializationContent |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public SerializationContent Content {get; set;} |
Return Value
A SerializationContent enumeration value that represents the chart content that will be serialized during a load, save or reset operation. By default all non-default chart properties (including data) are persisted.
The following example first serializes all appearance data to disk (only properties with non-default values), then loads the appearance data without resetting the chart's properties to their defaults. Axis labels are also serialized.
C# | Copy Code |
---|---|
// Save chart appearance properties that have non-default values, as well as axis labels. |
Visual Basic | Copy Code |
---|---|
' Save chart appearance properties that have non-default values., as well as axis labels. |
By default all chart properties will be serialized when the Save and Load methods are called. To provide more control over what is serialized use the Content property. Note that the SerializableContent and NonSerializableContent properties can also be used along with the Content property.
It is important to note that the Content property determines types of chart characteristics to be serialized (e.g. Appearance), and is actually implemented internally as the SerializableContent property. This means that setting the Content property and then setting the SerializableContent property will result in the Content property value being overridden, unless SerializableContent is concatenated. See the sample code below for an example of this.
Setting the Content property will automatically result in the serialization of all ChartArea and Series objects names, so the serialized data concerning chart areas and series will be applied to existing objects when loaded.
Setting this property affects all load, save and reset operations.
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