public PreferencesViewModel(Preferences model)
        {
            this.model = model;

            editing = new Preferences();
            model.CopyTo(editing);

            CommitCommand = new RelayCommand(o => Commit());
            CancelCommand = new RelayCommand(o => Cancel());
        }
        private void Commit()
        {
            editing.CopyTo(model);
            editing.SaveTo(App.PreferencePath);

            if (Committed != null)
            {
                Committed(this, EventArgs.Empty);
            }

            Close();
        }