public static void BindAttribute <T>(this Element self, BindAttributeOptions <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)); var attribute = options.Attribute; self.Bind(source, x => x.SetAttribute(attribute, property(source))); }
public void BindAttribute <T>(BindAttributeOptions <T> options) where T : class, INotifyPropertyChanged { StoreBinding(options.Attribute, options); }
/// <summary> /// Adds bindings for an attribute /// </summary> /// <typeparam name="T">Data type for data source instance</typeparam> /// <param name="options">Binding options</param> /// <returns>This instance</returns> public LaraBuilder BindAttribute <T>(BindAttributeOptions <T> options) where T : class, INotifyPropertyChanged { _stack.Peek().BindAttribute(options); return(this); }