SampleAvaloniaObject.cs 890 B

12345678910111213141516171819202122232425262728
  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. namespace Avalonia.Markup.Xaml.UnitTests
  5. {
  6. internal class SampleAvaloniaObject : AvaloniaObject
  7. {
  8. public static readonly StyledProperty<string> StringProperty =
  9. AvaloniaProperty.Register<AvaloniaObject, string>("StrProp", string.Empty);
  10. public static readonly StyledProperty<int> IntProperty =
  11. AvaloniaProperty.Register<AvaloniaObject, int>("IntProp");
  12. public int Int
  13. {
  14. get { return GetValue(IntProperty); }
  15. set { SetValue(IntProperty, value); }
  16. }
  17. public string String
  18. {
  19. get { return GetValue(StringProperty); }
  20. set { SetValue(StringProperty, value); }
  21. }
  22. }
  23. }