TestControlBase.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 IsSet(AvaloniaProperty property)
  48. {
  49. throw new NotImplementedException();
  50. }
  51. public IDisposable Bind(AvaloniaProperty property, IObservable<object> source, BindingPriority priority = BindingPriority.LocalValue)
  52. {
  53. throw new NotImplementedException();
  54. }
  55. public IDisposable Bind<T>(AvaloniaProperty<T> property, IObservable<T> source, BindingPriority priority = BindingPriority.LocalValue)
  56. {
  57. throw new NotImplementedException();
  58. }
  59. }
  60. }