SampleAvaloniaObject.cs 707 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace Avalonia.Markup.Xaml.UnitTests
  3. {
  4. internal class SampleAvaloniaObject : AvaloniaObject
  5. {
  6. public static readonly StyledProperty<string> StringProperty =
  7. AvaloniaProperty.Register<AvaloniaObject, string>("StrProp", string.Empty);
  8. public static readonly StyledProperty<int> IntProperty =
  9. AvaloniaProperty.Register<AvaloniaObject, int>("IntProp");
  10. public int Int
  11. {
  12. get => GetValue(IntProperty);
  13. set => SetValue(IntProperty, value);
  14. }
  15. public string String
  16. {
  17. get => GetValue(StringProperty);
  18. set => SetValue(StringProperty, value);
  19. }
  20. }
  21. }