SwitchButton.cs 648 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. namespace OpenSEMI.Ctrlib.Controls
  9. {
  10. public class SwitchButton : Button
  11. {
  12. public static readonly DependencyProperty ONProperty;
  13. static SwitchButton()
  14. {
  15. ONProperty = DependencyProperty.Register("ON", typeof(bool), typeof(SwitchButton));
  16. }
  17. public bool ON
  18. {
  19. get { return (bool)GetValue(ONProperty); }
  20. set { SetValue(ONProperty, value); }
  21. }
  22. }
  23. }