Ejemplo n.º 1
0
 /// <summary>
 /// Adds bindings for the children collection
 /// </summary>
 /// <typeparam name="T">Type of elements in the ovservable collection</typeparam>
 /// <param name="collection">Observable collection</param>
 /// <param name="creator">Handler to create elements</param>
 /// <returns>This instance</returns>
 public LaraBuilder BindChildren <T>(ObservableCollection <T> collection, Func <Element> creator)
 {
     BindingExtensions.BindChildren(_stack.Peek(), collection, _ => creator());
     return(this);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Updates the element's children collection based on an observable collection
 /// </summary>
 /// <typeparam name="TValue"></typeparam>
 /// <param name="source"></param>
 /// <param name="childFactory"></param>
 /// <returns></returns>
 public LaraBuilder BindChildren <TValue>(ObservableCollection <TValue> source, Func <TValue, Element> childFactory)
 {
     BindingExtensions.BindChildren(_stack.Peek(), source, childFactory);
     return(this);
 }