public static void BindToggleAttribute <T>(this Element self, BindFlagAttributeOptions <T> options) where T : class, INotifyPropertyChanged { var source = options.BindObject ?? throw new ArgumentNullException(nameof(options.BindObject)); var attribute = options.Attribute.ToLowerInvariant(); var property = options.Property ?? throw new ArgumentNullException(nameof(options.Property)); self.Bind(source, x => x.SetFlagAttributeLower(attribute, property(source))); }
public static void BindFlagAttribute <T>(this Element self, BindFlagAttributeOptions <T> options) where T : class, INotifyPropertyChanged { self.BindToggleAttribute(options); }
/// <summary> /// Adds bindings for a flag attribute /// </summary> /// <typeparam name="T">Data type for data source instance</typeparam> /// <param name="options">Binding options</param> /// <returns>This instance</returns> public LaraBuilder BindToggleAttribute <T>(BindFlagAttributeOptions <T> options) where T : class, INotifyPropertyChanged { _stack.Peek().BindToggleAttribute(options); return(this); }
public void BindFlagAttribute <T>(BindFlagAttributeOptions <T> options) where T : class, INotifyPropertyChanged { StoreBinding(options.Attribute, options); }
public LaraBuilder BindFlagAttribute <T>(BindFlagAttributeOptions <T> options) where T : class, INotifyPropertyChanged { return(BindToggleAttribute(options)); }