BaseMobileView.xaml.cs 765 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Xamarin.Forms.Xaml;
  7. namespace InABox.Mobile
  8. {
  9. [XamlCompilation(XamlCompilationOptions.Compile)]
  10. public partial class BaseMobileView
  11. {
  12. protected BaseMobileView()
  13. {
  14. InitializeComponent();
  15. }
  16. object _oldcontext = null;
  17. private void BaseMobileView_OnBindingContextChanged(object sender, EventArgs e)
  18. {
  19. if (BindingContext != _oldcontext)
  20. {
  21. _oldcontext = BindingContext;
  22. DoBindingContextChanged();
  23. }
  24. }
  25. protected virtual void DoBindingContextChanged()
  26. {
  27. }
  28. }
  29. }