public T AddEvent(string _EventName, UiFunction _PropValueFunc) { Myself.Events = Myself.Events ?? new Dictionary <string, List <UiFunction> >(); if (!Myself.Events.ContainsKey(_EventName)) { Myself.Events.Add(_EventName, new List <UiFunction>()); } Myself.Events[_EventName].Add(_PropValueFunc); return(Myself); }
public void AddProp(string _PropName, object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null) { if (_PropValue == null && _PropValueFunc == null && _Index == null) { return; } if (!this.ContainsKey(_PropName)) { this.Add(_PropName, new Prop()); } this[_PropName].Set(_PropValue, _PropValueFunc, _Index); }
public void Set(object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null) { if (_PropValue != null) { this.Values = this.Values ?? new List <object>(); this.Values.Add(_PropValue); } if (_PropValueFunc != null) { this.Funcs = this.Funcs ?? new List <UiFunction>(); this.Funcs.Add(_PropValueFunc); } if (_Index != null) { if (this.Indexs == null) { this.Indexs = new List <string>(); } this.Indexs.Add(_Index); } }
public T data_target(string value = null, UiFunction fun = null, string index = null) { return(AddProp("data-target", true)); }
public T aria_expanded(string value = null, UiFunction fun = null, string index = null) { return(AddProp("aria-expanded", true)); }
public T aria_label(string value = null, UiFunction fun = null, string index = null) { return(AddProp("aria-label", true)); }
public T type(string value = null, UiFunction fun = null, string index = null) { return(AddProp("type", value, fun, index)); }
public T AddContent(object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null) { Myself.Contents = Myself.Contents ?? new Prop(); Myself.Contents.Set(_PropValue, _PropValueFunc, _Index); return(Myself); }
public static T Button(string classes = null, string content = null, UiFunction ufunc = null) { return(New(Tag.button, classes, null, content).OnClick(ufunc)); }
public T OnChange(UiFunction ufunc) { return(AddEvent("onChange", ufunc)); }
public T placeholder(string value = null, UiFunction fun = null, string index = null) { return(AddProp("placeholder", value, fun, index)); }
public T For(string value = null, UiFunction fun = null, string index = null) { return(AddProp("for", value, fun, index)); }
public T activeClassName(string value = null, UiFunction fun = null, string index = null) { return(AddProp("activeClassName", value, fun, index)); }
public T height(int?value = null, UiFunction fun = null, string index = null) { return(AddProp("height", value, fun, index)); }
public T width(int?value = null, UiFunction fun = null, string index = null) { return(AddProp("width", value, fun, index)); }
public T href(string value = null, UiFunction fun = null, string index = null) { return(AddProp("href", value, fun, index)); }
public T Content(string value = null, UiFunction fun = null, string index = null) { return(AddContent(value, fun, index)); }
public T aria_hidden(string value = null, UiFunction fun = null, string index = null) { return(AddProp("aria-hidden", true)); }
//--------------------------------------- Events ---------------------------------// public T OnClick(UiFunction ufunc) { return(AddEvent("onClick", ufunc)); }
public T max(string value = null, UiFunction fun = null, string index = null) { return(AddProp("max", value, fun, index)); }
public T ShowIf(string var = null, UiFunction func = null) { return(AddProp("ShowIf", null, func, var)); }
public T colspan(string value = null, UiFunction fun = null, string index = null) { return(AddProp("colspan", value, fun, index)); }
public T AddProp(string _PropName, object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null) { Myself.Props = Myself.Props ?? new PropList(); Myself.Props.AddProp(_PropName, _PropValue, _PropValueFunc, _Index); return(Myself); }
public T role(string value = null, UiFunction fun = null, string index = null) { return(AddProp("role", true)); }
public T rows(string value = null, UiFunction fun = null, string index = null) { return(AddProp("rows", value, fun, index)); }
public T AddValidator(UiFunction func) { Validators = Validators ?? new List <UiFunction>(); Validators.Add(func); return(Myself); }