MobileAccordionItem.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using Xamarin.Forms;
  3. namespace InABox.Mobile
  4. {
  5. public class MobileAccordionItem : BindableObject
  6. {
  7. private static readonly BindableProperty TextProperty =
  8. BindableProperty.Create(nameof(Text), typeof(String), typeof(MobileAccordionItem), "");
  9. public String Text
  10. {
  11. get => GetValue(TextProperty) as String;
  12. set => SetValue(TextProperty, value);
  13. }
  14. private static readonly BindableProperty ContentProperty =
  15. BindableProperty.Create(nameof(Content), typeof(View), typeof(MobileAccordionItem));
  16. public View Content
  17. {
  18. get => GetValue(ContentProperty) as View;
  19. set => SetValue(ContentProperty, value);
  20. }
  21. private static readonly BindableProperty VisibleProperty =
  22. BindableProperty.Create(nameof(Visible), typeof(bool), typeof(MobileAccordionItem), true);
  23. public bool Visible
  24. {
  25. get => (bool)GetValue(VisibleProperty);
  26. set => SetValue(VisibleProperty, value);
  27. }
  28. private static readonly BindableProperty ButtonVisibleProperty =
  29. BindableProperty.Create(nameof(ButtonVisible), typeof(bool), typeof(MobileAccordionItem), true);
  30. public bool ButtonVisible
  31. {
  32. get => (bool)GetValue(ButtonVisibleProperty);
  33. set => SetValue(ButtonVisibleProperty, value);
  34. }
  35. private static readonly BindableProperty FrameVisibleProperty =
  36. BindableProperty.Create(nameof(FrameVisible), typeof(bool), typeof(MobileAccordion), true);
  37. public bool FrameVisible
  38. {
  39. get => (bool)GetValue(FrameVisibleProperty);
  40. set => SetValue(FrameVisibleProperty, value);
  41. }
  42. }
  43. }