Exemplo n.º 1
0
        public static void BindInnerText <T>(this Element self, BindInnerTextOptions <T> options)
            where T : class, INotifyPropertyChanged
        {
            var source   = options.BindObject ?? throw new ArgumentNullException(nameof(options.BindObject));
            var property = options.Property ?? throw new ArgumentNullException(nameof(options.Property));

            self.Bind(source, x => x.InnerText = property(source));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds bindings for inner text
 /// </summary>
 /// <typeparam name="T">Type of data source</typeparam>
 /// <param name="options">Inner tetx binding options</param>
 /// <returns>This instance</returns>
 public LaraBuilder BindInnerText <T>(BindInnerTextOptions <T> options)
     where T : class, INotifyPropertyChanged
 {
     _stack.Peek().BindInnerText(options);
     return(this);
 }