ChartSerializer.SerializableContent Property
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.
Gets or sets the chart properties that can be serialized.
public:
property System::String ^ SerializableContent { System::String ^ get(); void set(System::String ^ value); };
public string SerializableContent { get; set; }
member this.SerializableContent : string with get, set
Public Property SerializableContent As String
Property Value
A comma-separated string
expression that represents the chart properties to be serialized. The syntax is "Class.Property[,Class.Property]".
Remarks
By default all chart properties will be serialized when the Save
and Load
methods are called. You can use the NonSerializableContent property to limit chart characteristics to be serialized, along with the SerializableContent and Content properties.
The SerializableContent property determines which chart characteristics will be serialized. Wildcards can be used in the string expression, in the same manner as the NonSerializableContent property. For example, to serialize all chart BackColor
properties, set this property to "*.BackColor".
If ChartArea and/or Series child properties are specified, then the names of all ChartArea and Series objects must be also specified to enable the persisted data to be applied to existing ChartArea and Series objects; that is, you must specify "Series.Name" and "ChartArea.Name" expressions. See the sample code below for an example of this procedure. Similarly, if multiple chart areas are being used, the ChartArea property of all plotted Series must also be saved.
Sometimes, a property can be set to be both serialized and not serialized, which is common when wildcards are used. The NonSerializableContent expression has a lower priority when compared to the SerializableContent expression. However, note that less weight is given to string expressions that use wildcards. For example, if the SerializableContent property is set to "*.BackColor" and the NonSerializableContent property is set to BackColor, all BackColor
properties except for ChartArea objects will be serialized.
If you set the Content property, the SerializableContent property will be set internally. If the Content property is already set but another property needs to be serialized, make sure to concatenate the SerializableContent property when specifying that extra property. See the sample code below for an example of this procedure.
This property affects all save, load and reset operations.
Applies to
.NET