TestControlBase.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. public event EventHandler<AvaloniaPropertyChangedEventArgs> InheritablePropertyChanged;
  20. #pragma warning restore CS0067
  21. public string Name { get; set; }
  22. public virtual Classes Classes { get; set; }
  23. public Type StyleKey => GetType();
  24. public TestObservable SubscribeCheckObservable { get; private set; }
  25. public ITemplatedControl TemplatedParent
  26. {
  27. get;
  28. set;
  29. }
  30. IAvaloniaReadOnlyList<string> IStyleable.Classes => Classes;
  31. IObservable<IStyleable> IStyleable.StyleDetach { get; }
  32. public object GetValue(AvaloniaProperty property)
  33. {
  34. throw new NotImplementedException();
  35. }
  36. public T GetValue<T>(AvaloniaProperty<T> property)
  37. {
  38. throw new NotImplementedException();
  39. }
  40. public void SetValue(AvaloniaProperty property, object value, BindingPriority priority)
  41. {
  42. throw new NotImplementedException();
  43. }
  44. public void SetValue<T>(AvaloniaProperty<T> property, T value, BindingPriority priority = BindingPriority.LocalValue)
  45. {
  46. throw new NotImplementedException();
  47. }
  48. public bool IsAnimating(AvaloniaProperty property)
  49. {
  50. throw new NotImplementedException();
  51. }
  52. public bool IsSet(AvaloniaProperty property)
  53. {
  54. throw new NotImplementedException();
  55. }
  56. public IDisposable Bind(AvaloniaProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue)
  57. {
  58. throw new NotImplementedException();
  59. }
  60. public IDisposable Bind<T>(AvaloniaProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue)
  61. {
  62. throw new NotImplementedException();
  63. }
  64. }
  65. }