public static GroupedDotvvmProperty Create(DotvvmPropertyGroup group, string name) { var propname = group.Name + ":" + name; var prop = new GroupedDotvvmProperty(name, group) { PropertyType = group.PropertyType, DeclaringType = group.DeclaringType, DefaultValue = group.DefaultValue, IsValueInherited = false, Name = propname }; if (group.PropertyGroupMode == PropertyGroupMode.ValueCollection) { prop.IsVirtual = true; } DotvvmProperty.InitializeProperty(prop, (MemberInfo)group.DescriptorField ?? group.PropertyInfo); return(prop); }
public VirtualPropertyGroupDictionary(DotvvmBindableObject control, DotvvmPropertyGroup group) { this.control = control; this.group = group; }
private static void AddBindProperty(IHtmlWriter writer, IDotvvmRequestContext context, DotvvmPropertyGroup group, DotvvmControl control, IEnumerable <DotvvmProperty> properties) { var bindingGroup = new KnockoutBindingGroup(); foreach (var prop in properties) { bindingGroup.Add(prop.Name.Split(':')[1], control, prop); } writer.AddKnockoutDataBind("fast-attr", bindingGroup); }
public StyleBuilder <T> SetPropertyGroupMember(string prefix, string memberName, object value, StyleOverrideOptions options = StyleOverrideOptions.Overwrite) { var prop = DotvvmPropertyGroup.GetPropertyGroups(typeof(T)).Single(p => p.Prefixes.Contains(prefix)); return(SetDotvvmProperty(prop.GetDotvvmProperty(memberName), value, options)); }
public GroupedDotvvmProperty(string groupMemberName, DotvvmPropertyGroup propertyGroup) { this.GroupMemberName = groupMemberName; this.PropertyGroup = propertyGroup; }
public static DelegateActionPropertyGroup <TValue> Register <TDeclaringType>(PrefixArray prefixes, string name, Action <IHtmlWriter, IDotvvmRequestContext, DotvvmPropertyGroup, DotvvmControl, IEnumerable <DotvvmProperty> > func, TValue defaultValue = default(TValue)) { var descriptorField = DotvvmPropertyGroup.FindDescriptorField(typeof(TDeclaringType), name); return((DelegateActionPropertyGroup <TValue>)DotvvmPropertyGroup.Register(new DelegateActionPropertyGroup <TValue>(prefixes, typeof(TValue), descriptorField, name, defaultValue, func))); }
public PropertyGroupMember(DotvvmPropertyGroup group, string name) { this.Group = group; this.Name = name; }
public StyleBuilder <T> SetPropertyGroupMember(string prefix, string memberName, object value, bool append = true) { var prop = DotvvmPropertyGroup.GetPropertyGroups(typeof(T)).Single(p => p.Prefixes.Contains(prefix)); return(SetDotvvmProperty(prop.GetDotvvmProperty(memberName), value, append)); }