Beispiel #1
0
 public void DataContextChangedHandler(global::Windows.UI.Xaml.FrameworkElement sender, global::Windows.UI.Xaml.DataContextChangedEventArgs args)
 {
     global::ViewModels.PostViewModel data = args.NewValue as global::ViewModels.PostViewModel;
     if (args.NewValue != null && data == null)
     {
         throw new global::System.ArgumentException("Incorrect type passed into template. Based on the x:DataType global::ViewModels.PostViewModel was expected.");
     }
     this.SetDataRoot(data);
     this.Update();
 }
Beispiel #2
0
                public void PropertyChanged_(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    MainPage_obj7_Bindings bindings;

                    if (WeakRefToBindingObj.TryGetTarget(out bindings))
                    {
                        string propName = e.PropertyName;
                        global::ViewModels.PostViewModel obj = sender as global::ViewModels.PostViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_content(obj.content, DATA_CHANGED);
                                bindings.Update_distance(obj.distance, DATA_CHANGED);
                                bindings.Update_date(obj.date, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "content":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_content(obj.content, DATA_CHANGED);
                                }
                                break;
                            }

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

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

                            default:
                                break;
                            }
                        }
                    }
                }
Beispiel #3
0
 // Update methods for each path node used in binding steps.
 private void Update_(global::ViewModels.PostViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_content(obj.content, phase);
             this.Update_distance(obj.distance, phase);
             this.Update_date(obj.date, phase);
         }
     }
 }
Beispiel #4
0
 public void UpdateChildListeners_PostsVM_Post(global::ViewModels.PostViewModel obj)
 {
     if (obj != cache_PostsVM_Post)
     {
         if (cache_PostsVM_Post != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_PostsVM_Post).PropertyChanged -= PropertyChanged_PostsVM_Post;
             cache_PostsVM_Post = null;
         }
         if (obj != null)
         {
             cache_PostsVM_Post = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_PostsVM_Post;
         }
     }
 }
Beispiel #5
0
                public void UpdateChildListeners_(global::ViewModels.PostViewModel obj)
                {
                    MainPage_obj7_Bindings bindings;

                    if (WeakRefToBindingObj.TryGetTarget(out bindings))
                    {
                        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_;
                        }
                    }
                }
Beispiel #6
0
 private void Update_PostsVM_Post(global::ViewModels.PostViewModel obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_PostsVM_Post(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_PostsVM_Post_content(obj.content, phase);
         }
     }
     else
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.UpdateFallback_PostsVM_Post_content(phase);
         }
     }
 }
Beispiel #7
0
            // MainPage_obj7_Bindings

            public void SetDataRoot(global::ViewModels.PostViewModel newDataRoot)
            {
                this.bindingsTracking.ReleaseAllListeners();
                this.dataRoot = newDataRoot;
            }