This documentation is archived and is not being maintained.

ChartSerializer.NonSerializableContent Property

Gets or sets the chart properties that will not be serialized.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public string NonSerializableContent { get; set; }

Property Value

Type: System.String
A comma-separated string expression that represents the chart properties that will not be serialized. The syntax is "Class.Property[,Class.Property]".

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.

This property determines which chart characteristics will not be serialized. Wildcards can be used in the string expression, in the same manner as the SerializableContent property. For example, to exclude all chart BackColor properties from serialization, set this property to "*.BackColor".

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 the Content property has been set, the priority depends on how many wild cards are used in the NonSerializableContent expression. For example, setting the Content property to Appearance will result in the SerializableContent property containing a "*.Back*" expression. If the NonSerializableContent property is set to "*.Back*", all Back* chart properties such as BackColor, BackGradient, and so forth, will still be serialized. This is because the SerializableContent property value has higher priority when compared to the NonSerializableContent property.

This property affects all save, load and reset operations.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.