PreferenceProperty T  Class TIBCO Spotfire 6.0 API Reference
One or more preference properties constitute a preference implemented as a type extending PreferenceBase. Each preference property is identified by a name and the Category and SubCategory of the preference that it is contained in.

The value of a preference property is decided through inheritance, where user values always have precedence before group values, that is, a user can override that value of a property inherited from a group. The same way, a group can override the value of a parent group. In addition, the preference property may have a default values which is returned when neither parent group(s) nor the user has defined a value for the property.

Each property is also associated with a version number. This version number must always be increased if the property is changed from the prior version such that the new version cannot be interpreted by older version through the default behavior of the .Net serialization framework. For instance, if the type T is changed from String to Int32, the version number should be increased. The version number should also be increased if properties are added to or removed from T.

Inheritance Hierarchy

System Object
  DedicatedThreadAccessible
    Spotfire.Dxp.Framework.Preferences PreferencePropertyBase
      Spotfire.Dxp.Framework.Preferences PreferenceProperty T 

Namespace: Spotfire.Dxp.Framework.Preferences
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 13.19.7018.3940 (13.19.7018.3940)
Syntax

public sealed class PreferenceProperty<T> : PreferencePropertyBase
Type Parameters

T
The value type of this property. Note that it is highly recommended for this type to be immutable, that is, it should not be possible to make changes to the internal state of object of the type. If the type is not immutable, internal changes in object must be manually reported to the framework through calls to OnValueChanged .

Since the property is persisted using serialization, it is required of type T to be serializable. If T is a custom type, it must have a PersistenceVersion attribute.

See Also