Example #1
0
        public App()
        {
            InitializeComponent();

            MainPage = new MainPage();
            _mainVm  = (MainVm)MainPage.BindingContext;
        }
Example #2
0
 private void OnBindingContextChanged(object sender, EventArgs e)
 {
     if (_bindingContext != null)
     {
         _bindingContext.Alert -= Alert;
     }
     _bindingContext = BindingContext as MainVm;
     if (_bindingContext != null)
     {
         _bindingContext.Alert += Alert;
     }
 }