TestControlBase.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // Copyright (c) The Avalonia Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using System;
  4. using System.Reactive;
  5. using Avalonia.Collections;
  6. using Avalonia.Controls;
  7. using Avalonia.Data;
  8. namespace Avalonia.Styling.UnitTests
  9. {
  10. public class TestControlBase : IStyleable
  11. {
  12. public TestControlBase()
  13. {
  14. Classes = new Classes();
  15. SubscribeCheckObservable = new TestObservable();
  16. }
  17. #pragma warning disable CS0067 // Event not used
  18. public event EventHandler<AvaloniaPropertyChangedEventArgs> PropertyChanged;
  19. #pragma warning restore CS0067
  20. public string Name { get; set; }
  21. public virtual Classes Classes { get; set; }
  22. public Type StyleKey => GetType();
  23. public TestObservable SubscribeCheckObservable { get; private set; }
  24. public ITemplatedControl TemplatedParent
  25. {
  26. get;
  27. set;
  28. }
  29. IAvaloniaReadOnlyList<string> IStyleable.Classes => Classes;
  30. IObservable<IStyleable> IStyleable.StyleDetach { get; }
  31. public object GetValue(AvaloniaProperty property)
  32. {
  33. throw new NotImplementedException();
  34. }
  35. public T GetValue<T>(AvaloniaProperty<T> property)
  36. {
  37. throw new NotImplementedException();
  38. }
  39. public void SetValue(AvaloniaProperty property, object value, BindingPriority priority)
  40. {
  41. throw new NotImplementedException();
  42. }
  43. public void SetValue<T>(AvaloniaProperty<T> property, T value, BindingPriority priority = BindingPriority.LocalValue)
  44. {
  45. throw new NotImplementedException();
  46. }
  47. public bool IsAnimating(AvaloniaProperty property)
  48. {
  49. throw new NotImplementedException();
  50. }
  51. public bool IsSet(AvaloniaProperty property)
  52. {
  53. throw new NotImplementedException();
  54. }
  55. public IDisposable Bind(AvaloniaProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue)
  56. {
  57. throw new NotImplementedException();
  58. }
  59. public IDisposable Bind<T>(AvaloniaProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue)
  60. {
  61. throw new NotImplementedException();
  62. }
  63. }
  64. }