ChartSerializer.NonSerializableContent 属性

定义

获取或设置不进行序列化的图表属性。Gets or sets the chart properties that will not be serialized.

public:
 property System::String ^ NonSerializableContent { System::String ^ get(); void set(System::String ^ value); };
public string NonSerializableContent { get; set; }
member this.NonSerializableContent : string with get, set
Public Property NonSerializableContent As String

属性值

String

一个用逗号分隔的 string 表达式,表示不进行序列化的图表属性。A comma-separated string expression that represents the chart properties that will not be serialized. 语法为“Class.Property[,Class.Property]”。The syntax is "Class.Property[,Class.Property]".

注解

默认情况下 Save ,当调用和方法时,将序列化所有图表属性 LoadBy default all chart properties will be serialized when the Save and Load methods are called. 您可以使用 NonSerializableContent 属性来限制要序列化的图表特征,以及 SerializableContentContent 属性。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. 可以在字符串表达式中使用通配符,其方式与 SerializableContent 属性相同。Wildcards can be used in the string expression, in the same manner as the SerializableContent property. 例如,若要从序列化中排除所有图表 BackColor 属性,请将此属性设置为 "*"。背景色 "。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. NonSerializableContent与表达式相比,表达式的优先级较低 SerializableContentThe 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. 例如,如果将 SerializableContent 属性设置为 "*"。背景色 ",并将 NonSerializableContent 属性设置为 BackColor ,则 ackColor ChartArea 将序列化除对象之外的所有 B 属性。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.

如果 Content 已设置该属性,则优先级取决于表达式中使用的通配符数量 NonSerializableContentIf the Content property has been set, the priority depends on how many wild cards are used in the NonSerializableContent expression. 例如,将属性设置 ContentAppearance 将导致 SerializableContent 属性包含 "" * 。Back * "表达式。For example, setting the Content property to Appearance will result in the SerializableContent property containing a "*.Back*" expression. 如果该 NonSerializableContent 属性设置为 "" * 。后退 * ",所有 Back* 图表属性(例如 BackColorBackGradient 等)仍将进行序列化。If the NonSerializableContent property is set to "*.Back*", all Back* chart properties such as BackColor, BackGradient, and so forth, will still be serialized. 这是因为在 SerializableContent 与属性进行比较时,属性值具有更高的优先级 NonSerializableContentThis is because the SerializableContent property value has higher priority when compared to the NonSerializableContent property.

此属性会影响所有 save、load 和 reset 操作。This property affects all save, load and reset operations.

适用于