Dundas Chart for ASP.NET
NonSerializableContent Property
See Also  Example Send comments on this topic.
Dundas.Charting.WebControl Namespace > ChartSerializer Class : NonSerializableContent Property


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


Comma separated list of NON serializable (Save/Load/Reset) properties. "ClassName.PropertyName,[ClassName.PropertyName]".

Syntax

Visual Basic (Declaration)  
Public Property NonSerializableContent As String
Visual Basic (Usage) Copy Code
Dim instance As ChartSerializer
Dim value As String
 
instance.NonSerializableContent = value
 
value = instance.NonSerializableContent
C#  
public string NonSerializableContent {get; set;}

Return Value

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

Example

The following example serializes all appearance properties (that have non-default values), except for all chart BackColor properties.

C# Copy Code
// Save chart appearance properties that have non-default values, except for all BackColor properties
Chart1.Serializer.Content = SerializationContent.Appearance;
Chart1.Serializer.NonSerializableContent =
"*.BackColor";
Chart1.Serializer.Save(
"AppearanceProps.xml");
...

// Load the serialized appearance properties
Chart1.Serializer.Content = SerializationContent.Appearance;
Chart1.Serializer.NonSerializableContent =
"*.BackColor";
Chart1.Serializer.Load(
"AppearanceProps.xml");
Visual Basic Copy Code
' Save chart appearance properties that have non-default values, except for all BackColor properties
Chart1.Serializer.Content = SerializationContent.Appearance
Chart1.Serializer.NonSerializableContent = "*.BackColor"
Chart1.Serializer.Save("AppearanceProps.xml")
...

' Load the serialized appearance properties
Chart1.Serializer.Content = SerializationContent.Appearance
Chart1.Serializer.NonSerializableContent = "*.BackColor"
Chart1.Serializer.Load("AppearanceProps.xml")

Example

Remarks

By default all chart properties will be serialized when the Save and Load methods are called. To limit chart characteristics to be serialized the NonSerializableContent property can be used (along with the SerializableContent and Content properties).

This property determines what 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 (common when wildcards are used). NonSerializableContent has a lower priority when compared to the SerializableContent string expression. However, note that less weight is given to string expressions that use wildcards. For example, if SerializableContent is set to "*.BackColor" and NonSerializableContent is set to "ChartArea.BackColor" then all BackColor properties except for ChartArea objects will be serialized.

If the Content property has been set then the priority depends on how many wild cards are used in the NonSerializableContent expression. For example, setting the Content property to SerializationContent.Appearance will result in the SerializableContent property containing a "*.Back*" expression. If NonSerializableContent is set to "*.Back*" then all BackXXX chart properties will still be serialized since SerializableContent has higher priority compared to NonSerializableContent.

This property affects all save, load and reset operations.

Requirements

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

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.