Ejemplo n.º 1
0
 public bool SetDataRoot(global::System.Object newDataRoot)
 {
     this.bindingsTracking.ReleaseAllListeners();
     if (newDataRoot != null)
     {
         this.dataRoot = (global::FluentFileExplorer.ViewModels.ShellNavigationItem)newDataRoot;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
                public void UpdateChildListeners_(global::FluentFileExplorer.ViewModels.ShellNavigationItem obj)
                {
                    ShellPage_obj2_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        if (bindings.dataRoot != null)
                        {
                            ((global::System.ComponentModel.INotifyPropertyChanged)bindings.dataRoot).PropertyChanged -= PropertyChanged_;
                        }
                        if (obj != null)
                        {
                            bindings.dataRoot = obj;
                            ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_;
                        }
                    }
                }
Ejemplo n.º 3
0
 // Update methods for each path node used in binding steps.
 private void Update_(global::FluentFileExplorer.ViewModels.ShellNavigationItem obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | (1 << 0))) != 0)
         {
             this.Update_Icon(obj.Icon, phase);
             this.Update_Label(obj.Label, phase);
         }
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_SelectedForeground(obj.SelectedForeground, phase);
             this.Update_SelectedVis(obj.SelectedVis, phase);
         }
     }
 }
Ejemplo n.º 4
0
                public void PropertyChanged_(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    ShellPage_obj2_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::FluentFileExplorer.ViewModels.ShellNavigationItem obj = sender as global::FluentFileExplorer.ViewModels.ShellNavigationItem;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_SelectedForeground(obj.SelectedForeground, DATA_CHANGED);
                                bindings.Update_SelectedVis(obj.SelectedVis, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "SelectedForeground":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_SelectedForeground(obj.SelectedForeground, DATA_CHANGED);
                                }
                                break;
                            }

                            case "SelectedVis":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_SelectedVis(obj.SelectedVis, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                    }
                }