SamplePerspexObject.cs 881 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) The Perspex 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 Perspex.Xaml.Base.UnitTest
  5. {
  6. internal class SamplePerspexObject : PerspexObject
  7. {
  8. public static readonly PerspexProperty<string> StringProperty =
  9. PerspexProperty.Register<PerspexObject, string>("StrProp", string.Empty);
  10. public static readonly PerspexProperty<int> IntProperty =
  11. PerspexProperty.Register<PerspexObject, 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. }