LookupShell.cs 515 B

12345678910111213141516
  1. using System;
  2. using InABox.Core;
  3. using Xamarin.Forms;
  4. namespace InABox.Mobile
  5. {
  6. public abstract class LookupShell<TParent,TEntity> : Shell<TParent,TEntity>, ILookupShell
  7. where TParent : IModel, ILookupModel
  8. where TEntity : Entity, IRemotable, IPersistent, new()
  9. {
  10. public abstract string Code { get; }
  11. public abstract string Description { get; }
  12. public bool Selected { get; set; }
  13. public Color Colour => Selected ? Parent.Selected : Parent.Background;
  14. }
  15. }