public bool SetDataRoot(global::System.Object newDataRoot)
 {
     this.bindingsTracking.ReleaseAllListeners();
     if (newDataRoot != null)
     {
         this.dataRoot = (global::projectHerbariumMgmtIS.MainPage)newDataRoot;
         return(true);
     }
     return(false);
 }
 // Update methods for each path node used in binding steps.
 private void Update_(global::projectHerbariumMgmtIS.MainPage obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_StaffName(obj.StaffName, phase);
             this.Update_AccountLevel(obj.AccountLevel, phase);
         }
     }
 }
                public void DependencyPropertyChanged_AccountLevel(global::Windows.UI.Xaml.DependencyObject sender, global::Windows.UI.Xaml.DependencyProperty prop)
                {
                    MainPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        global::projectHerbariumMgmtIS.MainPage obj = sender as global::projectHerbariumMgmtIS.MainPage;
                        if (obj != null)
                        {
                            bindings.Update_AccountLevel(obj.AccountLevel, DATA_CHANGED);
                        }
                    }
                }
                public void UpdateChildListeners_(global::projectHerbariumMgmtIS.MainPage obj)
                {
                    MainPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        if (bindings.dataRoot != null)
                        {
                            bindings.dataRoot.UnregisterPropertyChangedCallback(global::projectHerbariumMgmtIS.MainPage.StaffNameProperty, tokenDPC_StaffName);
                            bindings.dataRoot.UnregisterPropertyChangedCallback(global::projectHerbariumMgmtIS.MainPage.AccountLevelProperty, tokenDPC_AccountLevel);
                        }
                        if (obj != null)
                        {
                            bindings.dataRoot     = obj;
                            tokenDPC_StaffName    = obj.RegisterPropertyChangedCallback(global::projectHerbariumMgmtIS.MainPage.StaffNameProperty, DependencyPropertyChanged_StaffName);
                            tokenDPC_AccountLevel = obj.RegisterPropertyChangedCallback(global::projectHerbariumMgmtIS.MainPage.AccountLevelProperty, DependencyPropertyChanged_AccountLevel);
                        }
                    }
                }