Guest User

Untitled

a guest
May 26th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. public class clsMotor : Control
  2. {
  3. static clsMotor()
  4. {
  5. DefaultStyleKeyProperty.OverrideMetadata(typeof(clsMotor), new FrameworkPropertyMetadata(typeof(clsMotor)));
  6. }
  7.  
  8. public bool _Draait = DraaitProperty;
  9. // HIER GEEFT HIJ FOUT DATIJ DraaitProperty niet kan converten naar bool
  10.  
  11. public bool Draait
  12. {
  13. get
  14. {
  15. return _Draait;
  16. }
  17. set
  18. {
  19. _Draait = value;
  20. }
  21. }
  22.  
  23. public static bool GetDraait(DependencyObject obj)
  24. {
  25. return (bool)obj.GetValue(DraaitProperty);
  26. }
  27.  
  28. public static void SetDraait(DependencyObject obj, bool value)
  29. {
  30. obj.SetValue(DraaitProperty, value);
  31. }
  32.  
  33. // Using a DependencyProperty as the backing store for Draait. This enables animation, styling, binding, etc...
  34. public static readonly DependencyProperty DraaitProperty =
  35. DependencyProperty.RegisterAttached("Draait", typeof(bool), typeof(clsMotor), new UIPropertyMetadata(1));
Add Comment
Please, Sign In to add comment