Which Control Properties can be automatically saved and loaded with ApplicationSettings?

ApplicationSettings automatically persist and bind property values for a component under the following circumstances:

  1. The component implements IBindableComponent.
  2. The component has either:
    1. A PropertyChanged event for the specific property (e.g., TextChanged, ValueChanged, etc…)
    2. or the component implements INotifyPropertyChanged.

Since all controls inherit from System.Windows.Forms.Control and Control implements IBindableComponent for controls you really only need to worry about the 2nd requirement.  If the control has a property changed event for the specific property then it will probably be automatically persisted when connected to an ApplicationSetting property.

No comments:

Post a Comment