Setting.cs 741 B

1234567891011121314151617181920212223242526272829
  1. using PixiEditor.Helpers;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Windows.Controls;
  6. namespace PixiEditor.Models.Tools.ToolSettings
  7. {
  8. public abstract class Setting : NotifyableObject
  9. {
  10. public string Name { get; protected set; }
  11. public string Label { get; set; }
  12. public bool HasLabel => !string.IsNullOrEmpty(Label);
  13. private object value;
  14. public object Value { get => value;
  15. set
  16. {
  17. this.value = value;
  18. RaisePropertyChanged("Value");
  19. }
  20. }
  21. public Control SettingControl { get; set; }
  22. public Setting(string name)
  23. {
  24. Name = name;
  25. }
  26. }
  27. }