Inheritance: ObservableObject
        public void LoadFromStream(Stream stream)
        {
            var serializer = new XmlSerializer(typeof(UserSettings));
              var settings = serializer.Deserialize(stream) as UserSettings;

              if (settings == null)
            settings = new UserSettings();

              Settings = settings;
        }
 public static UserSettings CreateDefaults()
 {
     var settings = new UserSettings();
       settings.ResetDefaults();
       return settings;
 }
        void OnSettingChanging(UserSettings settings, string propertyName)
        {
            if (settings == null)
            throw new ArgumentNullException("settings");

              if (propertyName == null)
            throw new ArgumentNullException("propertyName");

              var handler = this.SettingChanging;

              if (handler != null)
            handler(settings, new PropertyChangingEventArgs(propertyName));
        }