MobilePageStackItem.cs 763 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using Xamarin.Forms;
  3. namespace InABox.Mobile
  4. {
  5. public class MobilePageStackItem : BindableObject
  6. {
  7. private readonly BindableProperty ContentProperty = BindableProperty.Create(
  8. nameof(Content),
  9. typeof(View),
  10. typeof(MobilePageStackItem)
  11. );
  12. public View Content
  13. {
  14. get => GetValue(ContentProperty) as View;
  15. set => SetValue(ContentProperty, value);
  16. }
  17. public event EventHandler Appearing;
  18. public void DoAppearing() => Appearing?.Invoke(this, EventArgs.Empty);
  19. public event EventHandler Disappearing;
  20. public void DoDisappearing() => Disappearing?.Invoke(this, EventArgs.Empty);
  21. }
  22. }