Exemple #1
0
 public CollectionUpdater(BindChildrenOptions <T> options,
                          Element element,
                          NotifyCollectionChangedEventArgs args)
 {
     _options = options;
     _element = element;
     _args    = args;
 }
Exemple #2
0
 public void BindChildren <T>(BindChildrenOptions <T> options)
     where T : class, INotifyPropertyChanged
 {
     UnbindChildren();
     options.Apply(_parent);
     options.CollectionChanged += Options_CollectionChanged;
     options.Subscribe();
     _childrenBinding = options;
 }
Exemple #3
0
 public static void CollectionLoad(BindChildrenOptions <T> options, Element element)
 {
     CollectionReset(element);
     foreach (var item in options.Collection)
     {
         var callback = options.CreateCallback;
         var child    = callback(item);
         element.AppendChild(child);
     }
 }
Exemple #4
0
 public static void BindChildren <T>(this Element self, BindChildrenOptions <T> options)
 {
     self.BindChildren(options.Collection, options.CreateCallback);
 }
Exemple #5
0
 /// <summary>
 /// Adds bindings for the children collection
 /// </summary>
 /// <typeparam name="T">Type of elements in observable collection</typeparam>
 /// <param name="options">Children bindings options</param>
 /// <returns>This instance</returns>
 public LaraBuilder BindChildren <T>(BindChildrenOptions <T> options)
     where T : class, INotifyPropertyChanged
 {
     _stack.Peek().BindChildren(options);
     return(this);
 }
Exemple #6
0
 public LaraBuilder BindChildren <T>(BindChildrenOptions <T> options)
 {
     _stack.Peek().BindChildren(options);
     return(this);
 }