MobileButtonStripItem.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Xamarin.Forms;
  2. namespace InABox.Mobile
  3. {
  4. public class MobileButtonStripItem : BindableObject
  5. {
  6. private readonly BindableProperty TextProperty = BindableProperty.Create(
  7. nameof(Text),
  8. typeof(string),
  9. typeof(MobileButtonStripItem),
  10. "");
  11. public string Text
  12. {
  13. get => (string)GetValue(TextProperty);
  14. set => SetValue(TextProperty, value);
  15. }
  16. private readonly BindableProperty SelectedProperty = BindableProperty.Create(
  17. nameof(Selected),
  18. typeof(bool),
  19. typeof(MobileButtonStripItem),
  20. false);
  21. public bool Selected
  22. {
  23. get => (bool)GetValue(SelectedProperty);
  24. set => SetValue(SelectedProperty, value);
  25. }
  26. private readonly BindableProperty IndexProperty = BindableProperty.Create(
  27. nameof(Index),
  28. typeof(int),
  29. typeof(MobileButtonStripItem),
  30. 0);
  31. public int Index
  32. {
  33. get => (int)GetValue(IndexProperty);
  34. set => SetValue(IndexProperty, value);
  35. }
  36. }
  37. }